apifacebookgraph apipublishing

Facebook Graph API: how to post to a Facebook Page in 2026

By Published Updated

Facts checked against the official docs on

Short answer: to post to a Facebook Page with the Graph API, you need a Meta app with Facebook Login for Business, the Page permissions pages_show_list, pages_manage_posts and pages_read_engagement approved in App Review, and a Page access token. With that token, POST /{page-id}/feed publishes a text or link post, POST /{page-id}/photos publishes a photo, and reels go through a three-step upload session on /{page-id}/video_reels. Meta lists no price for these calls; the cost is the review process and rate limits.

This guide covers what Meta requires, the calls with real code, the same post through Ampost, and the limits that catch people out.

What the Facebook Graph API needs before you can post

"Facebook Graph API" is Meta's HTTP API for everything on Facebook. Posting to a Page uses the subset Meta calls the Pages API. Every call goes to https://graph.facebook.com/{version}/.... The newest version is v27.0, released on November 4, 2026.

Requirement What it means
A Meta app Created in the Meta App Dashboard. Facebook Login for Business is Meta's preferred login for apps that act on businesses' Pages
A Facebook Page Publishing posts as the Page. The person who logs in must be able to perform the CREATE_CONTENT task on it (a Page admin can perform every task)
Permissions pages_show_list, pages_manage_posts and pages_read_engagement (a dependency of pages_manage_posts). Meta's Posts guide also lists pages_manage_engagement and pages_read_user_engagement, and publish_video for videos
App Review Every Page permission needs App Review before people without a role on your app can grant it
Business Verification Advanced Access, the level that lets any Facebook user grant a permission, requires a verified business
Data Use Checkup Apps with Advanced Access certify their data use once a year
Price Meta lists no per-call price for the Pages API

Until App Review approves a permission, your app has only Standard Access. It can then ask for that permission only from people with a role on the app (admins, developers, testers). That is enough to build and test against your own Page.

Post to a Facebook Page in 5 steps

1. Get a User access token

Send the user through Facebook Login for Business with the permissions above. The token you get back is short-lived. Exchange it on your server for a long-lived User access token, valid for about 60 days:

curl -G "https://graph.facebook.com/v27.0/oauth/access_token" \
  -d "grant_type=fb_exchange_token" \
  -d "client_id=$APP_ID" \
  -d "client_secret=$APP_SECRET" \
  -d "fb_exchange_token=$SHORT_LIVED_USER_TOKEN"

This request carries your app secret, so it never runs in a browser or a mobile app.

2. Get the Page ID and Page access token

GET /me/accounts lists the Pages the user granted your app, each with its ID, a Page access token and the tasks the user can perform on it:

curl -G "https://graph.facebook.com/v27.0/me/accounts" \
  -d "fields=id,name,access_token,tasks" \
  -H "Authorization: Bearer $LONG_LIVED_USER_TOKEN"

A Page access token taken from a long-lived User token has no expiration date. Store one per Page: a user can grant your app several Pages, and your product needs to let them choose which one to post to. Pages that a business portfolio owns may be missing from this list unless the user also granted business_management.

3. Publish a text or link post

curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/feed" \
  -H "Authorization: Bearer $PAGE_TOKEN" \
  -d "message=Our API docs are live" \
  --data-urlencode "link=https://example.com/docs"

The response is the post ID, {"id": "{page-id}_{post-id}"}, and the post's URL is https://www.facebook.com/{post-id}. The same call in Python:

import requests

GRAPH = "https://graph.facebook.com/v27.0"

response = requests.post(
    f"{GRAPH}/{page_id}/feed",
    headers={"Authorization": f"Bearer {page_token}"},
    data={"message": "Our API docs are live", "link": "https://example.com/docs"},
)
response.raise_for_status()
print(response.json()["id"])

4. Publish photos

One photo goes to /{page-id}/photos with a public URL. The response has the photo ID and the feed post ID:

curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/photos" \
  -H "Authorization: Bearer $PAGE_TOKEN" \
  --data-urlencode "url=https://cdn.example.com/chart.png" \
  -d "caption=This week in charts"

For several photos in one post, upload each one with published=false, then create the feed post with their IDs in attached_media:

curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/photos" \
  -H "Authorization: Bearer $PAGE_TOKEN" \
  --data-urlencode "url=https://cdn.example.com/one.png" \
  -d "published=false"
# repeat for each photo, then:
curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/feed" \
  -H "Authorization: Bearer $PAGE_TOKEN" \
  -d "message=Three charts from the launch" \
  --data-urlencode 'attached_media=[{"media_fbid":"PHOTO_ID_1"},{"media_fbid":"PHOTO_ID_2"}]'

5. Publish a reel

Reels take three calls: start an upload session, upload the file, then finish and publish.

# 1. Start: returns video_id and upload_url
curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/video_reels" \
  -H "Authorization: Bearer $PAGE_TOKEN" \
  -d "upload_phase=start"

# 2. Upload a hosted file to the upload_url from step 1
curl -X POST "$UPLOAD_URL" \
  -H "Authorization: OAuth $PAGE_TOKEN" \
  -H "file_url: https://cdn.example.com/reel.mp4"

# 3. Finish and publish
curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/video_reels" \
  -H "Authorization: Bearer $PAGE_TOKEN" \
  -d "upload_phase=finish" \
  -d "video_id=$VIDEO_ID" \
  -d "video_state=PUBLISHED" \
  -d "description=Behind the scenes"

Facebook processes the video after this call returns. Read GET /{video-id}?fields=status until status.video_status is ready (or a phase reports error) before you show the reel as published.

Scheduling. To publish a feed post later, send published=false and scheduled_publish_time (a UNIX timestamp) to /{page-id}/feed. Meta accepts a time between 10 minutes and 30 days after the request.

The same post through Ampost

Everything above is yours to build and keep running when you integrate the Graph API directly: the Meta app and its review, the login flow, choosing among the user's Pages, storing one token per Page, the photo and reel upload flows, and polling video processing. Ampost has done that work and passed Meta's review for it. You connect the Page once in Ampost (from the dashboard or POST /api/accounts/connect), then send one request:

curl -X POST https://api.ampost.io/api/posts \
  -H "Authorization: Bearer amp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "targets": [{ "platforms": ["facebook"] }],
    "text": "Three charts from the launch",
    "media": [
      { "url": "https://cdn.example.com/one.png", "type": "image" },
      { "url": "https://cdn.example.com/two.png", "type": "image" }
    ],
    "options": { "facebook": { "placement": "feed" } },
    "publishNow": true
  }'

The same request body works for every Facebook post type:

{
  "targets": [{ "platforms": ["facebook"] }],
  "text": "Behind the scenes",
  "media": [{ "url": "https://cdn.example.com/reel.mp4", "type": "video" }],
  "options": { "facebook": { "placement": "reel" } },
  "scheduledFor": "2026-12-01T09:00:00Z"
}

What Ampost does with it, and where it saves work:

  • Placement picks the flow. feed sends a text or link post, a photo, a multi-photo post (up to 10 photos) or a video. story sends each photo or video as a Page story. reel sends one video through the upload session above.
  • Media is fitted to Facebook's limits. Images and videos outside them are resized or re-encoded before publishing, for example to 9:16 for reels.
  • Status is tracked for you. Videos and reels show as processing until Facebook finishes, then published with their URL.
  • Scheduling, edits and deletes. scheduledFor schedules the post on Ampost's side, so it is not bound to Meta's 30-day window. You can edit a published post's text and delete the post.
  • A first comment. firstComment posts a comment as the Page right after the post goes up.
  • Revoked tokens are detected. When Facebook answers with error 190, Ampost marks the connection as revoked, so you can ask the user to reconnect the Page.

The same POST /api/posts operation is also the posts_create tool on Ampost's MCP server, with the same arguments. Where Ampost does not save you work: it publishes as a Page only, and it does not expose Facebook's audience targeting (targeting.geo_locations). If you need those Graph API features, call the Graph API directly. Request fields and errors are in the API docs; plans and limits are on pricing.

Limits and gotchas

Limit Value Source
Calls with a Page access token 4,800 × engaged users of the Page, per rolling 24 hours Rate limits
Calls with a User or app token App: 200 × daily active users per rolling hour; users have their own undisclosed limit Rate limits
Reels 30 API-published reels per Page in a 24-hour moving window Reels Publishing API
Reel video 3 to 90 seconds, 9:16, at least 540 × 960 (1080 × 1920 recommended), 24 to 60 fps Reels Publishing API
Scheduled posts 10 minutes to 30 days ahead Posts
Post text 63,206 characters Ampost's Facebook rules

The gotchas:

  • The token type decides the rate limit. Calls made with a Page token count against the Page's budget (Business Use Case limits). Calls made with a User token count against your app and the user. Make publishing calls with the Page token.
  • Error 190 means the token is no longer valid. Retrying does not help; the user has to log in again.
  • Errors 4, 17, 32 and 613 are rate limits (app, user, Pages and custom limits). Back off and retry later; the X-App-Usage and X-Business-Use-Case response headers show how close you are and when you can resume.
  • You can edit only your own app's posts. POST /{post-id} with a new message works only on posts your app created.
  • Media must be on a public URL. Facebook downloads url and file_url itself, so a signed URL that expires in a minute, or a file behind a login, fails.
  • Versions are retired. A Graph API version is available for about two years (v25.0 until July 29, 2028). Pin one, and put the upgrade on your calendar.

Related guides

Threads uses a different API host and a different login. See the Threads API guide for its two-step publishing flow and its 250-posts-a-day limit.

FAQ

Frequently asked questions

Is the Facebook Graph API free?

Meta lists no price for the Pages API. What it costs is setup: a Meta app, App Review for every Page permission, Business Verification for Advanced Access, and rate limits that grow with the Page's engagement.

Can the Graph API post to a personal Facebook profile?

The publishing calls in this guide post as a Page, with a Page access token, to a Page the user can create content on. Ampost connects Facebook Pages, not personal profiles.

Which permissions do I need to post to a Facebook Page?

pages_show_list to list the user's Pages, pages_manage_posts to create, edit and delete posts, and pages_read_engagement, which pages_manage_posts depends on. Meta's Posts guide also lists pages_manage_engagement and pages_read_user_engagement, and publish_video for videos. The user must be able to perform the CREATE_CONTENT task on the Page.

Do Page access tokens expire?

A Page access token taken from a long-lived User access token has no expiration date, but Meta can still invalidate it under certain conditions. A call with an invalid token fails with error code 190, and the user has to log in again.

How many posts can I publish to a Page per day?

Meta documents no daily cap for feed posts. Reels are limited to 30 API-published reels per Page in a moving 24-hour window. Every call made with a Page access token also counts against a rolling 24-hour call budget of 4,800 times the number of people who engaged with the Page.

Can I schedule a Facebook post with the Graph API?

Yes. Send published=false with scheduled_publish_time to POST /{page-id}/feed. The publish time must be between 10 minutes and 30 days after the request.

Which Graph API version should I use?

The newest version was v27.0, released on November 4, 2026. Each version stays available for about two years; v25.0, for example, is available until July 29, 2028. Pin a version in your URLs and upgrade before it is retired.