Skip to main content

Facebook

Facebook automated posting is for Pages. Personal profile posting is not supported by the Facebook APIs used by SimplePost.

Content support

CapabilitySupport
TextPage posts up to 63,206 characters (Facebook's hard limit).
ImagesUp to 10 images.
VideoOne video.
Mixed video and imagesNot supported.
Native Facebook schedulingpublishAt option (ISO 8601 timestamp).

Set up credentials

1. Create a Facebook Page

Use your personal Facebook account to create or select the Page you want to post to. You must be an admin or have equivalent page management permissions.

2. Create a Meta developer account

Open Meta for Developers and complete developer registration if needed.

3. Create a Facebook app

If you also plan to post to Instagram, create the app through the Instagram guide so one Meta app can be used for both Facebook and Instagram.

For Facebook-only posting:

  1. Open Meta Apps.
  2. Create an app.
  3. Select a Page management use case if available.
  4. Finish app creation.

4. Add required permissions

In the app use-case or permissions area, add:

pages_manage_posts
pages_show_list

If your Page is connected to a business portfolio, you may also need:

business_management

5. Get a Page access token

The simplest owner-only path is the Graph API Explorer:

  1. Open Graph API Explorer.
  2. Select your app.
  3. Choose Get Page Access Token.
  4. Grant the required permissions.
  5. Call /me/accounts.
  6. Copy the Page ID and the Page Access Token for the target Page.

Use the Access Token Debugger to inspect token type, permissions, and expiration.

6. Extend the token

Short-lived Page tokens can expire quickly. Use the Access Token Debugger to extend the user token, then call /me/accounts again to obtain a long-lived Page token.

Environment variables

FACEBOOK_PAGE_ACCESS_TOKEN=
FACEBOOK_PAGE_ID=

Both variables must be set together.

SDK options

Schedule a Facebook post through Facebook's native scheduling support:

await post({
content: { text: "Scheduled Facebook post" },
platforms: ["facebook"],
options: {
facebook: {
publishAt: "2030-01-01T12:00:00Z",
},
},
});

REST server account

Add this entry under accounts in the self-hosted REST server's accounts.json:

{
"id": "fb-page",
"platform": "facebook",
"platformAccountId": "1234567890",
"credentials": {
"pageAccessToken": "...",
"pageId": "1234567890"
}
}