Skip to content

Facebook Pages

Facebook Page posts use the official Pages API. Nothing is posted by automating facebook.com. A group post is not sent. Meta removed the Groups API, including publish_to_groups, on April 22, 2024. That removal is in the Graph API v19.0 changelog.

Checked against the Pages posts guide, the comments guide, and the video publishing guide.

Kind Rule
Text The Page post text, up to 63,206 characters
Link One https URL, with optional text. The card comes from the URL.
Photo One to ten images. JPEG, PNG, WebP, or GIF, up to 10 MB each.
Video One MP4, up to 256 MB and 20 minutes
Group post Prepared here, then posted by a person in the group. See Handoff-only posts.

The person who connects the Page needs the CREATE_CONTENT task on that Page. If they manage more than one Page, the connection names the Pages and asks them to choose one.

A first comment is posted on the Page post after Facebook accepts it. Reading other people’s comments is on Inbox and listening. Direct messages are not requested.

  1. Open developers.facebook.com/apps and create an app.
  2. Add Facebook Login and the Pages use case.
  3. Add the redirect URI exactly: {APP_PUBLIC_ORIGIN}/api/connect/facebook/callback.
  4. Request pages_show_list, pages_read_engagement, pages_manage_posts, pages_manage_engagement, pages_read_user_engagement, and publish_video. Do not request publish_to_groups or Messenger.
  5. Submit those permissions in App Review. Until they are approved, only people with a role on the app can connect a Page. The screencast should show connecting a Page, publishing a post, and reading a comment.
  6. After approval, switch the app to Live.
  7. Put the app id and secret in FACEBOOK_CLIENT_ID and FACEBOOK_CLIENT_SECRET.
  8. Set FACEBOOK_HTTP_ALLOW_NETWORK=1 only on the server that may call graph.facebook.com. Set FACEBOOK_GRAPH_VERSION if the app is not on v27.0.

A short-lived user token is exchanged for a long-lived user token of about 60 days. The Page token used for publishing comes from that user token. Refresh mints a new Page token while the user token is still valid.