# Posting to a Facebook Page with the Graph API: Page Tokens, Photos, Video and Scheduling

> Post to a Facebook Page with the Graph API in 2026: getting a Page token that never expires, text, photo, multi-photo and video posts, native scheduling and errors.

Canonical: https://tesselith.com/blog/facebook-graph-api-post-to-page
Last updated: 2026-11-27

**To post to a Facebook Page with the Graph API, you need a Page access token, not a user token.** Get one by exchanging the user's login for a long-lived user token, then reading `GET /me/accounts`, which returns every Page they manage with its own token. A text or link post is `POST /{page-id}/feed` with `message`. A photo post is `POST /{page-id}/photos` with `url`. To schedule natively, add `published=false` and a `scheduled_publish_time` between 10 minutes and 30 days ahead. The token needs `pages_manage_posts`, and the user needs permission to create content on that Page.

**Key takeaways**
- Publish with a Page access token from /me/accounts. A user token can't post as the Page.
- A Page token derived from a long-lived user token has no expiration date.
- Text goes to /feed, one photo to /photos, several photos are uploaded unpublished then attached to one /feed post, video goes to /videos.
- Native scheduling: published=false plus scheduled_publish_time, 10 minutes to 30 days out.
- Graph API v27.0 is current (November 2026). v21.0 is removed on January 21, 2027.

## Permissions and Page tasks

Meta's Pages API docs list these permissions for publishing as of November 2026: `pages_manage_posts`, `pages_read_engagement`, `pages_manage_engagement` and `pages_read_user_engagement`, plus `publish_video` if you post video. You'll also want `pages_show_list`. It backs `/me/accounts`, and `pages_manage_posts` declares it as a dependency. Leave it out and the connect flow works for your own admin account under Standard Access, then fails for every real customer after review. We learned that one the hard way.

Permissions aren't enough on their own. The person who logs in must be able to perform the `CREATE_CONTENT`, `MANAGE` and `MODERATE` tasks on the Page. Someone with an Analyst role on a Page will grant your app the scopes and still be unable to post through it.

## Step 1: get a Page token that doesn't expire

The Facebook Login code exchange gives you a short-lived user token that lasts about an hour. Swap it server-side for a long-lived user token, which lasts about 60 days. Then fetch the Pages. Page tokens obtained with a long-lived user token have no expiration date. They're invalidated only under certain conditions, such as the user changing their password, removing your app, or losing their role on the Page.

```bash
# 1. Short-lived user token -> long-lived user token (server-side only)
curl "https://graph.facebook.com/v27.0/oauth/access_token?grant_type=fb_exchange_token&client_id=$APP_ID&client_secret=$APP_SECRET&fb_exchange_token=$SHORT_USER_TOKEN"

# 2. List the Pages this person manages, each with its own token
curl "https://graph.facebook.com/v27.0/me?fields=id,accounts.limit(100){id,name,access_token}&access_token=$LONG_USER_TOKEN"
```

Store the Page token per Page. One login can manage dozens of Pages, so show the list and let the person pick. Taking the first Page in the response hands an agency whichever Page Meta happened to sort first. Also store the Meta user id (`id` above). Meta's deauthorization and data-deletion callbacks identify a person, not a Page, and without the user id you can't match the callback to the channels it affects.

## Step 2: publish a text or link post

```bash
curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/feed" \
  --data-urlencode "message=Open late this Friday: kitchen until midnight." \
  --data-urlencode "link=https://example.com/menu" \
  -d "access_token=$PAGE_TOKEN"

# {"id": "123456789012345_987654321098765"}
```

The returned id is `{page-id}_{post-id}`. Store it whole. Comments, insights and deletes all take the full id.

## Photos: one, several, and why they differ

A single photo is a different endpoint from a text post. `POST /{page-id}/photos` with a public `url` and a `caption` creates the photo and its feed story in one call. Meta downloads the file from the URL, so it must be public and reachable.

Several photos in one post can't go through `/photos`, which carries one image per call. Upload each photo with `published=false`, collect the ids, then create one `/feed` post that attaches them with `attached_media`.

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

async function graphPost(path: string, params: Record<string, string>) {
  const res = await fetch(GRAPH + path, { method: "POST", body: new URLSearchParams(params) })
  const data = await res.json()
  if (!res.ok || data.error) throw Object.assign(new Error(data.error?.message), { meta: data.error })
  return data
}

export async function postAlbum(pageId: string, token: string, message: string, urls: string[]) {
  const ids: string[] = []
  for (const url of urls) {
    const photo = await graphPost("/" + pageId + "/photos", { url, published: "false", access_token: token })
    ids.push(photo.id)
  }
  const params: Record<string, string> = { message, access_token: token }
  ids.forEach((id, i) => { params["attached_media[" + i + "]"] = JSON.stringify({ media_fbid: id }) })
  return graphPost("/" + pageId + "/feed", params)
}
```

Mixing photos and a video in one post isn't supported through this flow. Validate that before uploading, or you'll leave orphaned unpublished photos on the Page.

## Video posts

Video has its own edge: `POST /{page-id}/videos` with a `file_url` that Meta fetches and a `description` for the text. It needs `publish_video` on top of the other permissions. For large files, use Meta's resumable upload flow in the Video API instead of a single `file_url`. A video post takes one video. If you're publishing vertical short video, Facebook Reels have their own endpoint and publishing flow in the Video API, so check which surface you actually want before you build.

## Scheduling posts with the Graph API

Facebook is one of the few networks with native scheduling in its API. Create the post unpublished with a future time, and Facebook publishes it for you even if your servers are down.

```bash
curl -X POST "https://graph.facebook.com/v27.0/$PAGE_ID/feed" \
  --data-urlencode "message=Holiday market stall opens at 8am on Friday." \
  -d "published=false" \
  -d "scheduled_publish_time=1796371200" \
  -d "access_token=$PAGE_TOKEN"
```

| Rule | Value (Meta docs, Nov 2026) |
| --- | --- |
| Earliest | 10 minutes after the request |
| Latest | 30 days after the request |
| Formats | UNIX seconds, ISO 8601, or a strtotime() string |
| Relative strings like 'tomorrow' | Allowed, but read back scheduled_publish_time to confirm |
| Editing | An app can only update posts it created |

Should you use native scheduling or your own queue? Native is great for a single fixed post: no worker has to wake up. It's worse for anything you might change. Edits and cancellations have to go back through the API, posts beyond 30 days need your own storage anyway, and nothing else in your system knows the post exists unless you track it. Most schedulers, ours included, keep the schedule themselves and publish at the time with an immediate call, so the same code path handles every network. See our [posting queue explainer](https://tesselith.com/blog/social-media-posting-queue) for how slot-based scheduling works.

## Errors: classify on the body

Meta reports errors as `{"error": {"code": ..., "error_subcode": ..., "message": ...}}`, and an expired token shows up as code 190 regardless of the HTTP status. Read the code before deciding what to do.

| Code | Meaning | Action |
| --- | --- | --- |
| 190 | Access token invalid or expired | Stop retrying, ask for reconnection |
| 102 | Session problem | Treat like 190 |
| 4 | App-level rate limit | Back off, retry later |
| 17 | User-level rate limit | Back off, retry later |
| 32, 613 | Page or call-volume throttling | Back off, retry later |
| 1, 2 | Transient Meta error | Retry with backoff |
| 100 | Invalid parameter | Fix the request, don't retry |
| 368 | Temporarily blocked for policy reasons | Don't retry. A human needs to look |

Missing a permission is not an auth error. Reconnecting doesn't fix an app that never got `pages_manage_posts` approved, so don't flag the channel for reconnection on it, or you'll send the customer in a loop.

## Versions and deprecations to watch

Graph API v27.0 shipped on November 4, 2026. Meta supports each version for roughly two years, and v21.0 is removed on January 21, 2027, followed by v22.0 on May 20, 2027. If your code still says v20 or v21 anywhere (analytics calls are the usual stragglers), bump them now. Unversioned calls use your app's default version, which may not be the one you tested.

And one thing you can't do any more: post to Facebook Groups. Meta removed Groups publishing from the API in 2024. Our article on [scheduling posts to Facebook Groups](https://tesselith.com/blog/can-you-schedule-posts-to-facebook-groups) covers what still works.

## Checklist before you ship

1. Request pages_show_list alongside pages_manage_posts, and test with a non-admin tester account.
2. Exchange for a long-lived user token before reading /me/accounts, so the Page tokens don't expire.
3. Let the user pick Pages. Store the Page id, Page token and Meta user id.
4. Route single photos to /photos, albums through unpublished uploads plus /feed, video to /videos.
5. Pin v27.0 in one constant and grep for old versions.
6. Classify errors by code: 190 means reconnect, rate-limit codes mean wait, 100 means fix.
7. Handle deauthorization callbacks so revoked Pages stop showing as connected.

## When to use a scheduling API instead of building it yourself

A single Page poster is an afternoon. The long tail is the expensive part: App Review for each permission, Page pickers for agencies, the photo/album/video split, version bumps, deauthorization callbacks, and then the same work for Instagram, which shares the review but not the endpoints.

Tesselith publishes to [Facebook Pages](https://tesselith.com/schedule/facebook) today, through the app or the [REST API](https://tesselith.com/product/api), alongside Instagram, Threads, YouTube, Bluesky, Mastodon and Telegram. If you're weighing the options, read our [scheduling API checklist](https://tesselith.com/blog/social-media-scheduling-api) and the [automation walkthrough](https://tesselith.com/blog/automate-social-media-posting-api), or open the [docs](https://tesselith.com/docs).

## Questions people ask

### How do I post to a Facebook Page using the Graph API?

Get a Page access token from GET /me/accounts, then POST to /{page-id}/feed with a message for text or link posts, or to /{page-id}/photos with a url for a photo post.

### Do Facebook Page access tokens expire?

A Page token obtained from a long-lived user token has no expiration date. It can still be invalidated, for example if the user removes the app or loses their Page role.

### Can you schedule Facebook posts through the API?

Yes. Create the post with published=false and a scheduled_publish_time between 10 minutes and 30 days from the request.

### How do I post multiple photos to a Facebook Page via API?

Upload each photo to /{page-id}/photos with published=false, then create one /{page-id}/feed post that lists the photo ids in attached_media.

### What permissions do I need to post to a Facebook Page?

pages_manage_posts with its dependency pages_show_list, plus pages_read_engagement, and publish_video for video. The user must also have content-creation rights on the Page.

---
Tesselith · https://tesselith.com · Full site index: https://tesselith.com/llms.txt
