Overview

The Pages API is a set of Facebook Graph API endpoints that apps can use to create and manage a Page's settings and content.

Components

Access Tokens

API authentication is handled through Access Tokens. Most endpoints require Page access tokens, which are unique to each Page, app User, and app, and have an expiration time. In order to get a token from an app User, the app User must own or be able to perform a Task on the Page.

You can get access tokens from your app Users by implementing Facebook Login.

For Pages that have been migrated to the New Page Experience, a Page access token is now required for all available endpoints with the follwing exceptions:

Graph API

If you are unfamiliar with the Graph API, please read our Graph API documentation before proceeding to learn more about the Meta social graph.

Facebook Login

Facebook Login allows app users to log into your app and for your app to ask your users for permissions to access data.

Facebook Login for Business

Facebook Login for Business is the preferred authentication and authorization solution for Tech Providers and business app developers who need access to their business clients' assets

Features

Some endpoints require a Feature which must be approved through the App Review process before your app can use them when your app goes live. Features allow you to access public Page data without a permission or the ability to perform a task on the Page. Refer to each endpoint's reference to determine which Page Feature it requires.

Mentions

@mentions allows your Page to publicly reply to a specific person, who has posted on your Page or commented on your Page post, in a comment or reply.

Page-Scoped User IDs

Users who interact with Pages are identified by Page-Scoped User IDs (PSID). PSIDs are IDs that are unique to each User-Page pair. Pages API and Messenger Platform endpoints rely on PSIDs, so you can use a PSID to identify a User's interactions with a Page, as well as the User's public Messenger conversations with that Page.

Permissions

Most endpoints require one or more permissions which must be granted to your app by app users. Typically this can be done through Facebook Login but can also be done through the Business Manager, if your app has been claimed by a Business.

All permissions require App Review before an app user can grant them to your app after it is live. For Business apps, which do not have app modes, permissions must be approved for Advanced access before they can be granted to your app by an app user without a role on the app itself or a role in a Business that has claimed it.

Page Search

Find information about Facebook Pages including names, locations, and find Pages to @Mention, Page locations, and tag a Page to show branded content.

Rate Limits

All Pages endpoint requests are subject to Rate Limiting. You can see your app's current call count consumption in the App Dashboard.

Tasks

Tasks allow Users to perform specific actions on a Page. When a User uses an app to interact with a Page, depending on the attempted action, we will first check if the User has been approved for a task that permits that type of action.

You can approve individual users for the following tasks:

TaskPermitted Actions

ADVERTISE

  • Create ads
  • Create unpublished Page Posts
  • If an Instagram account is connected to the Page, create ads

ANALYZE

  • View Insights of the Page
  • View which Page admin published a post or comment

CREATE_CONTENT

  • Publish content as the Page on the Page

MANAGE

  • Assign and manage Page tasks

MANAGE_LEADS

  • View and manage leads

MESSAGING

  • Send messages as the Page

MODERATE

  • Respond to comments on Page posts as the Page
  • Delete comments on Page posts
  • If an Instagram account is connected to the Page, publish content to Instagram from Facebook, respond to and delete comments, send Direct messages, sync business contact info, and create ads.

VIEW_MONETIZATION_INSIGHTS

  • View monetization insights

If a person is given Admin access to a Page in the UI, that person is able to perform all tasks on that Page.

Messenger Platform

Have Messenger conversations with your customers or people interested in your Page.

Meta Webhooks for Pages

Get get real-time notifications when a user comments on a Page post or reacts to your Page post.

App Review

All Page-related Permissions and Features require approval through the App Review process before your app can use them when your app goes live.

Apps in Development Mode can request any Permission from any app User who has a Role on the app.

How It Works

This is a typical flow for accessing the Pages API:

  1. Get a User Access Token from the app User through Facebook Login.
  2. Query the /me/accounts endpoint to get the ID and Page Access Token of the Page the app User has permitted your app to access.
  3. Capture the returned Page ID and Page Access Token.
  4. Use the ID and token to query the Page node.

Note that in some cases the app User may grant your app access to more than one Page, in which case you should capture each Page ID and its respective token, and provide a way for the app User to target each of those Pages.

Next Steps

Follow our Get Started guide to learn how to publish a Page post using the Pages API.