7 day free trial →
PostEverywhere
PostEverywhere Logo
Pricing
Features
Social Media Management

All-in-one platform for every workflow

Social Media Scheduler

Schedule to 8 platforms from one dashboard

Content Calendar

Visual drag-and-drop content planner

Publishing

Create and distribute across platforms

Automation

Auto-post at optimal times with AI

AI Content Generator

Generate captions, images & videos

AI Image Generator

Create visuals from text prompts

Analytics

Track performance across platforms

Multi-Account

Manage up to 40 accounts

Bulk Scheduling

Upload CSV & schedule hundreds of posts

Platforms
Instagram

Posts, Reels, Stories & Carousels

LinkedIn

Profiles & company pages

TikTok

Videos & photo carousels

Facebook

Pages, groups & Reels

X

Posts, threads & media

YouTube

Videos, Shorts & community

Threads

Text posts & media

Pinterest

Pins & idea pins

API Docs
Resources
Blog

Social media tips and strategies

Free Tools

30+ free social media utilities

AI Models

Browse 50+ AI image & video models

How‑To Guides

Step-by-step tutorials

Support

Help center & contact

For Agencies

Multi-client management at scale

For Creators

Grow your audience everywhere

Join with GoogleStart 7-day free trial
Pricing
Features
  • Social Media Management
  • Social Media Scheduler
  • Content Calendar
  • Publishing
  • Automation
  • AI Content Generator
  • AI Image Generator
  • Analytics
  • Multi-Account
  • Bulk Scheduling
Platforms
  • Instagram
  • LinkedIn
  • TikTok
  • Facebook
  • X
  • YouTube
  • Threads
  • Pinterest
API Docs
Resources
  • Blog
  • Free Tools
  • AI Models
  • How‑To Guides
  • Support
  • For Agencies
  • For Creators
Log in
DevelopersFacebook

How to Schedule Facebook Posts with an API (2026 Guide)

Jamie Partridge
Jamie Partridge
Founder·April 13, 2026·Updated April 13, 2026·15 min read
Schedule Facebook posts with an API developer guide

The Facebook Graph API is the most mature social platform API available. It is also the one most likely to reject your app during review if you do not know the process inside out.

If you want to schedule Facebook posts programmatically — whether you are building a SaaS product, an internal tool, an AI agent, or a client dashboard — you have two options. Build directly on Meta's Graph API, or use a unified API like PostEverywhere that handles the complexity for you.

This guide covers both approaches with working code, explains the App Review process that trips up most developers, and breaks down the differences between Pages, Groups, and Profile access.

Table of Contents

  1. Option 1: Facebook Graph API (Native)
  2. Option 2: PostEverywhere API
  3. Comparison: Graph API vs Unified API
  4. Facebook App Review Process
  5. Pages vs Groups vs Profiles
  6. Rate Limits and Quotas
  7. FAQs

Option 1: Facebook Graph API (Native)

The Facebook Graph API gives you direct access to Facebook Pages, including post creation, scheduling, media uploads, and Reels publishing. It is powerful, well-documented, and comes with a significant setup cost.

Requirements

Before you write a single line of code, you need three things:

  1. A Facebook App — create one in the Meta Developer Portal. Choose the "Business" app type.
  2. Business Verification — Meta requires you to verify your business identity through Meta Business Suite. This involves uploading legal documents and typically takes 2-5 business days.
  3. App Review — you must submit your app for review to request the permissions needed for publishing. Without approval, you can only interact with Pages and accounts that have a role on your app (admin, developer, tester).

The permissions you need:

  • pages_manage_posts — create and schedule posts on Pages
  • pages_read_engagement — read post metrics and comments
  • pages_show_list — list Pages the user manages
  • pages_read_user_content — read user-generated content on Pages

For photo and video uploads, you also need pages_manage_metadata. For Reels, add pages_manage_engagement.

Authentication: OAuth 2.0 and Page Access Tokens

Facebook uses OAuth 2.0 for authentication. The flow works like this:

  1. User authorises your app — redirect them to Facebook's OAuth dialog. They grant your app the permissions you requested.
  2. You receive a short-lived user token — valid for about 1-2 hours.
  3. Exchange it for a long-lived user token — valid for 60 days.
  4. Exchange that for a Page access token — this is what you actually use for posting.

Here is the token exchange flow:

import requests

# Step 1: Exchange short-lived token for long-lived token
response = requests.get(
    "https://graph.facebook.com/v21.0/oauth/access_token",
    params={
        "grant_type": "fb_exchange_token",
        "client_id": APP_ID,
        "client_secret": APP_SECRET,
        "fb_exchange_token": SHORT_LIVED_TOKEN
    }
)
long_lived_token = response.json()["access_token"]

# Step 2: Get Page access token
response = requests.get(
    f"https://graph.facebook.com/v21.0/me/accounts",
    params={"access_token": long_lived_token}
)
pages = response.json()["data"]
page_token = pages[0]["access_token"]  # Token for your first Page
page_id = pages[0]["id"]

The Page access token you get from this flow is a long-lived Page token. Unlike user tokens, Page tokens obtained from a long-lived user token do not expire — they remain valid until the user changes their password, deauthorises your app, or the Page role changes. This is the token you store and use for all subsequent API calls.

Token management tip: always store the long-lived user token alongside the Page token. When things break (and they will), you need the user token to re-fetch Page tokens without making the user re-authenticate.

Posting to Pages

To create a text post on a Facebook Page:

response = requests.post(
    f"https://graph.facebook.com/v21.0/{page_id}/feed",
    params={"access_token": page_token},
    json={
        "message": "Launching our new product today. Check the link in bio."
    }
)
post_id = response.json()["id"]

To post with a link (Facebook auto-generates the preview):

response = requests.post(
    f"https://graph.facebook.com/v21.0/{page_id}/feed",
    params={"access_token": page_token},
    json={
        "message": "We wrote about our approach to content scheduling.",
        "link": "https://posteverywhere.ai/blog"
    }
)

Scheduling Posts

Facebook supports native scheduling through the Graph API. You set published to false and provide a scheduled_publish_time as a Unix timestamp:

import time

# Schedule for 24 hours from now
publish_time = int(time.time()) + 86400

response = requests.post(
    f"https://graph.facebook.com/v21.0/{page_id}/feed",
    params={"access_token": page_token},
    json={
        "message": "This post will go live tomorrow.",
        "published": False,
        "scheduled_publish_time": publish_time
    }
)
scheduled_post_id = response.json()["id"]

Constraints to keep in mind:

  • The scheduled_publish_time must be between 10 minutes and 30 days in the future.
  • You cannot schedule posts to personal profiles — only Pages.
  • Scheduled posts appear in the "Scheduled Posts" section of the Page's Publishing Tools.
  • To update or delete a scheduled post, use the post ID returned from the creation call.

Photo and Video Uploads

Photos — upload to the /{page-id}/photos endpoint:

# Upload a photo post
response = requests.post(
    f"https://graph.facebook.com/v21.0/{page_id}/photos",
    params={"access_token": page_token},
    data={
        "message": "Behind the scenes at the office.",
        "url": "https://example.com/photo.jpg"  # Or use 'source' for file upload
    }
)

You can also upload photos as a file using multipart/form-data by passing the source parameter instead of url.

Videos — upload to the /{page-id}/videos endpoint. For videos larger than a few MB, use the resumable upload API:

# Simple video upload (small files)
response = requests.post(
    f"https://graph.facebook.com/v21.0/{page_id}/videos",
    params={"access_token": page_token},
    data={
        "description": "Product demo walkthrough.",
        "title": "Q2 Product Demo"
    },
    files={
        "source": open("demo.mp4", "rb")
    }
)

For videos, scheduling works the same way — add published=false and scheduled_publish_time.

Reels Publishing

Facebook Reels use a separate publishing flow via the Reels Publishing API. It is a two-step process:

# Step 1: Initialize the upload
response = requests.post(
    f"https://graph.facebook.com/v21.0/{page_id}/video_reels",
    params={"access_token": page_token},
    json={
        "upload_phase": "start"
    }
)
video_id = response.json()["video_id"]

# Step 2: Upload the video file
requests.post(
    f"https://rupload.facebook.com/video-upload/v21.0/{video_id}",
    headers={
        "Authorization": f"OAuth {page_token}",
        "offset": "0",
        "file_size": str(file_size)
    },
    data=open("reel.mp4", "rb")
)

# Step 3: Publish the Reel
response = requests.post(
    f"https://graph.facebook.com/v21.0/{page_id}/video_reels",
    params={"access_token": page_token},
    json={
        "upload_phase": "finish",
        "video_id": video_id,
        "description": "Check out our latest feature update."
    }
)

Reels have specific requirements: vertical video (9:16 aspect ratio), 3-90 seconds long, minimum 720p resolution, and MP4 format. If your video does not meet these specs, the upload will succeed but publishing will fail — often without a clear error message.

Rate Limits

The Graph API enforces rate limits at multiple levels:

  • Application-level: 200 calls per hour per user per app. This resets on a rolling basis.
  • Page-level: Pages are also subject to a separate rate limit. If your app manages many Pages, you hit the application limit before the Page limit.
  • Business Use Case limits: apps approved for Business use cases get higher limits, typically 4,800 calls per hour.

The x-app-usage and x-page-usage headers in every API response tell you your current usage percentage. Monitor these to avoid hitting the wall.

Option 2: PostEverywhere API

If you do not want to deal with App Review, token management, and per-platform rate limits, a unified API handles all of that for you.

The PostEverywhere API lets you schedule posts to Facebook Pages (plus Instagram, LinkedIn, X, Threads, YouTube, and TikTok) with a single endpoint. Authentication is a single API key. No OAuth flows, no token refresh logic, no App Review.

import requests

api_key = "pe_live_your_api_key"

# Schedule a Facebook Page post
response = requests.post(
    "https://app.posteverywhere.ai/api/v1/posts",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "content": "Launching our new feature today. Full details on the blog.",
        "platforms": ["facebook"],
        "scheduled_at": "2026-04-14T15:00:00Z"
    }
)

print(response.json())
# {
#   "id": "post_abc123",
#   "status": "scheduled",
#   "platforms": ["facebook"],
#   "scheduled_at": "2026-04-14T15:00:00Z"
# }

To post with an image:

response = requests.post(
    "https://app.posteverywhere.ai/api/v1/posts",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "content": "Behind the scenes at our team offsite.",
        "platforms": ["facebook", "instagram", "linkedin"],
        "media": [{"url": "https://example.com/team-photo.jpg"}],
        "scheduled_at": "2026-04-14T15:00:00Z"
    }
)

One request, three platforms, one image. The API handles format requirements, aspect ratio validation, and platform-specific media processing. If you want to cross-post to every network you support, just add the platform slugs to the array.

For a deeper walkthrough of the full API including webhooks, status polling, and error handling, see the Social Media Scheduling API Guide.

Building a Facebook integration? The PostEverywhere API handles App Review, token refresh, and rate limits so you do not have to. Start with 1,000 free API calls — no credit card required.

Comparison: Graph API vs Unified API

Here is how the two approaches compare side by side:

Feature Facebook Graph API PostEverywhere API
Setup time Days to weeks (App Review) Minutes (API key)
Authentication OAuth 2.0 + Page tokens API key
Token management You handle refresh logic Managed for you
App Review required Yes No
Business Verification Yes No
Schedule posts Yes (Unix timestamp) Yes (ISO 8601)
Photo uploads Yes Yes
Video uploads Yes (resumable upload) Yes (URL or upload)
Reels Yes (separate API) Yes (same endpoint)
Multi-platform Facebook only 7 platforms
Rate limits 200 calls/hr per user Plan-based, higher limits
Cost Free (after approval) Starts at $19/mo
Webhooks Limited Full status callbacks

If you only need Facebook and you already have a Meta-approved app, the Graph API is free and gives you full control. If you need multiple platforms, or you want to skip the weeks-long App Review process, the unified approach saves significant engineering time.

For teams evaluating Facebook scheduling tools, the API-first approach gives you the same scheduling capability without being locked into a specific dashboard.

Facebook App Review Process

App Review is the biggest blocker for developers building on the Graph API. Here is what to expect and how to avoid the most common rejection reasons.

What You Need to Submit

  1. A detailed description of your app — explain what it does, who uses it, and why you need each permission.
  2. A screencast — a video walkthrough showing your app in action. Meta reviewers watch this to verify you are using permissions correctly. Keep it under 2 minutes, show the exact flow where each permission is used.
  3. A privacy policy URL — hosted on your domain, covering how you handle Facebook user data.
  4. Business Verification — must be completed before you submit for review.

Permissions to Request

For scheduling posts to Pages, request these permissions:

  • pages_manage_posts — required to create and schedule posts
  • pages_show_list — required to list Pages the user manages
  • pages_read_engagement — required if you display post analytics

Do not request permissions you do not use. Meta rejects apps that ask for more access than they need. If you are only posting to Pages and not reading user content, do not request pages_read_user_content.

Common Rejection Reasons

1. Insufficient screencast. The video must show your production app (or a realistic staging version) using each permission in a real workflow. A localhost demo with fake data will get rejected.

2. Over-requesting permissions. If you ask for publish_video but your app only posts text, you will be rejected. Request only what you use today.

3. Missing privacy policy. The privacy policy must be accessible at the URL you provide. A 404 or a generic template that does not mention Facebook data handling will fail review.

4. No business verification. You must complete business verification before submitting. The review team will not process your submission without it.

5. Platform Policy violations. Common ones include: automating personal profile posts (not allowed), scraping data from Pages you do not manage, and using the API to inflate engagement metrics.

Timeline

Expect 5-10 business days for the initial review. If rejected, you can resubmit after addressing the feedback. Second reviews are typically faster (3-5 business days). Plan for 2-4 weeks total from first submission to approval, accounting for one round of revisions.

If this timeline does not work for your project, the PostEverywhere API lets you bypass App Review entirely and start posting to Facebook Pages within minutes.

Pages vs Groups vs Profiles

Not all Facebook surfaces have the same API access. This catches developers off guard.

Pages

Pages are the primary publishing surface for the Graph API. You get full CRUD access: create posts, schedule them, upload media, publish Reels, and read engagement metrics. All the code examples in this guide target Pages.

Any business or creator can create a Page, and the API permissions for managing Pages are the most straightforward to get approved.

Groups

Group posting via the API is extremely restricted. Meta removed most Group publishing permissions in 2018 during the Cambridge Analytica fallout and never fully restored them.

What you can do:

  • Post to Groups where your app has been explicitly added as an admin or editor.
  • Read content from Groups using the groups_access_member_info permission (requires App Review).

What you cannot do:

  • Post to arbitrary Groups on behalf of users.
  • Schedule Group posts via the API (no scheduled_publish_time support for Groups).
  • Upload media to Groups via the API in most cases.

If your use case requires Group posting, you are better off using the Facebook interface directly or exploring the PostEverywhere Facebook scheduler for manual scheduling with a visual calendar.

Personal Profiles

The Graph API does not support posting to personal profiles. Meta deprecated the publish_actions permission in 2018. There is no replacement.

You cannot:

  • Create posts on a user's personal timeline.
  • Schedule posts to personal profiles.
  • Share content to personal profiles via the API.

This is a hard platform restriction, not an App Review limitation. No level of approval grants you profile posting access. If a third-party tool claims to post to personal Facebook profiles via the API, they are either using an undocumented method that could break at any time, or they are not being honest about their approach.

For Page management at scale, understanding the Facebook algorithm helps you optimise post timing and format selection for reach.

Rate Limits and Quotas

Rate limits on the Graph API are not straightforward. Here is how they actually work:

Application-Level Rate Limits

Your app gets 200 API calls per user per hour. This means if 10 users have authorised your app, you can make 2,000 calls per hour total. The limit scales with your user base.

Monitor the x-app-usage header in every response:

{
  "call_count": 28,
  "total_cputime": 12,
  "total_time": 15
}

When any of these values exceeds 100, your app is throttled. Calls return HTTP 429 with an error code of 4 (for app-level) or 32 (for Page-level).

Business Use Case Rate Limits

If your app is approved for a specific Business Use Case during App Review, you get elevated limits — typically 4,800 calls per hour. This applies to most apps approved for pages_manage_posts.

Page-Level Rate Limits

Individual Pages have their own rate limits, tracked via the x-page-usage header. These are separate from your application limits and prevent any single Page from being overwhelmed by API activity.

Best Practices for Staying Under Limits

  1. Batch where possible. Use batch requests (POST / with a batch parameter) to combine up to 50 API calls into a single HTTP request. Each sub-request still counts against your limit, but you reduce network overhead.
  2. Cache responses. Do not re-fetch Page information, token details, or post metadata on every request. Cache aggressively with a reasonable TTL.
  3. Implement exponential backoff. When you get a 429, wait and retry. Start with 1 second, double on each retry, cap at 5 minutes.
  4. Use webhooks instead of polling. Subscribe to Page webhooks for post engagement updates instead of polling the API every few minutes.

Dealing with rate limits across multiple platforms? The PostEverywhere API manages rate limits, retries, and queuing across all 7 supported platforms. Check the developer docs for plan-specific rate limits.

FAQs

Can I schedule posts to personal Facebook profiles via the API?

No. Meta removed the publish_actions permission in 2018 and has not introduced a replacement. The Graph API only supports posting to Pages and, in limited cases, Groups. This is a platform restriction that applies to all developers regardless of app approval status.

How long do Facebook Page access tokens last?

Page access tokens obtained from a long-lived user access token do not expire. They remain valid until the user changes their Facebook password, deauthorises your app, or their role on the Page changes. Store them securely and implement error handling to detect when a token becomes invalid.

How long does Facebook App Review take?

Plan for 5-10 business days for the initial review. If your submission is rejected, address the feedback and resubmit — second reviews typically take 3-5 business days. Budget 2-4 weeks total from first submission to approval. An alternative is the PostEverywhere API, which requires no App Review.

What is the difference between the Graph API and Marketing API?

The Graph API handles content publishing — creating posts, uploading media, scheduling content. The Marketing API handles paid advertising — creating ad campaigns, managing audiences, and tracking ad performance. For scheduling organic posts, you only need the Graph API.

Can I post to Facebook Groups via the API?

In a very limited capacity. Your app must be added as an admin or editor of the Group, and even then, the functionality is restricted. Meta severely limited Group API access in 2018. Scheduling is not supported for Group posts. Most developers find the limitations make API-based Group posting impractical.

What video formats does the Facebook API accept?

Facebook accepts MP4 and MOV formats for standard video uploads. For Reels, the requirements are stricter: MP4 only, 9:16 aspect ratio, 3-90 seconds, minimum 720p resolution. The Video API documentation lists the full set of accepted codecs and container formats. H.264 video codec with AAC audio is the safest combination.

How do I handle token expiration in production?

Store the long-lived user token and implement a refresh flow. When you receive an OAuthException with error code 190, the token has expired. Exchange a new short-lived token for a long-lived one, then re-fetch the Page access token. Build this into your error handling middleware so it runs automatically without user intervention.

Is there a sandbox or test mode for the Graph API?

Yes. Any Facebook App in "Development" mode functions as a sandbox. You can make API calls using accounts that have a role on the app (admin, developer, or tester) without going through App Review. This is useful for building and testing, but you cannot interact with Pages or users outside your app's team until you pass review.

Wrap Up

The Facebook Graph API gives you full control over Page publishing, scheduling, media uploads, and Reels. The trade-off is setup time — App Review, Business Verification, token management, and rate limit monitoring are real engineering costs.

If you are building a product that only needs Facebook, the native API is the right choice. You own the integration, you control the data flow, and there are no per-post costs.

If you are building across multiple platforms — or you need to ship a Facebook integration this week rather than next month — a unified API eliminates the review process and token complexity. The PostEverywhere developer docs have everything you need to get started, including SDKs for Python, Node.js, and cURL examples.

For teams exploring the broader landscape of social media scheduling APIs, this Facebook-specific guide is one piece of the puzzle. The patterns here — token management, scheduling with timestamps, media upload flows — apply across every platform, even if the specifics differ.

Jamie Partridge
Written by Jamie Partridge

Founder & CEO of PostEverywhere. Writing about social media strategy, publishing workflows, and analytics that help brands grow faster.

Contents

  • Table of Contents
  • Option 1: Facebook Graph API (Native)
  • Option 2: PostEverywhere API
  • Comparison: Graph API vs Unified API
  • Facebook App Review Process
  • Pages vs Groups vs Profiles
  • Rate Limits and Quotas
  • FAQs
  • Wrap Up

Related

  • Social Media Scheduling API: The Complete Developer Guide
  • How to Schedule Instagram Posts with an API (2026 Guide)
  • How to Schedule LinkedIn Posts with an API (2026 Guide)
  • How the Facebook Algorithm Works in 2026 (Beat the 2% Organic Reach)

Related Articles

Developers

Social Media Scheduling API: The Complete Developer Guide

Everything you need to know about social media scheduling APIs — how they work, which platforms support them, rate limits, and how to build your own scheduling workflow.

March 23, 2026·25 min read
Developers

How to Schedule Instagram Posts with an API (2026 Guide)

Learn how to schedule Instagram posts programmatically using the Instagram Graph API or a unified scheduling API. Includes cURL examples, rate limits, and a side-by-side comparison.

April 13, 2026·15 min read
Developers

How to Schedule LinkedIn Posts with an API (2026 Guide)

LinkedIn's API is one of the most restrictive in social media. This guide covers both the native LinkedIn API and a simpler alternative — with code examples, approval tips, and gotchas.

April 13, 2026·15 min read
Facebook

How the Facebook Algorithm Works in 2026 (Beat the 2% Organic Reach)

How Facebook's algorithm ranks your Feed, Reels, Groups, and Marketplace in 2026. Confirmed ranking factors from Meta's Transparency Center, plus what actually drives organic reach.

March 23, 2026·18 min read
Tools

10 Best Facebook Schedulers in 2026 (I Tested Them All)

I tested every major Facebook scheduling tool on the market. Here are the 10 best for Pages, Reels, and Groups — with real pricing, honest pros and cons, and who each one is actually for.

April 10, 2026·17 min read

Ready to Transform Your Social Media Strategy?

Try PostEverywhere to streamline your social media management. Our powerful platform helps you schedule, analyze, and optimize your social media presence across all platforms.

Start Free TrialExplore Our Features

Footer

PostEverywhere

The all-in-one platform for social media management and growth. Built for marketing teams in the US, UK, Canada, Australia & Europe.

XLinkedInInstagram
ToolPilot

Product

  • Features
  • Platforms
  • Industries
  • Small Business
  • Pricing
  • Developers
  • Resources

Features

  • Social Media Scheduling
  • Calendar View
  • AI Content Generator
  • AI Image Generator
  • Best Time to Post
  • Cross-Posting
  • Multi-Account Management
  • Workspaces
  • Bulk Scheduling
  • Agents
  • Campaign Management
  • Analytics

Integrations

  • Instagram Integration
  • LinkedIn Integration
  • TikTok Integration
  • Facebook Integration
  • X Integration
  • YouTube Integration
  • Threads Integration
  • Pinterest Integration

Resources

  • Resources Hub
  • How-To Guides
  • Blog
  • API Docs
  • Help

Free Tools

  • Post Previewer
  • Viral Score Predictor
  • Engagement Calculator
  • Content Repurposer
  • 30-Day Content Generator
  • Grid Previewer
  • Viral Hook Generator
  • Hashtag Generator
  • Character Counter
  • UTM Link Builder

Company

  • Contact
  • Privacy
  • Terms

© 2026 PostEverywhere. All rights reserved.