Configure Facebook Pages

View .md

Complete BYOK setup for Facebook Pages: create the Meta app, configure Facebook Login, enable Page scopes and connect through Dravo.


Dravo signs a Facebook user in, calls /me/accounts, and stores a Page access token for every Facebook Page that user manages (one connected account per Page). Personal-profile publishing is not supported.

Platform configuration verified against Meta's official documentation on June 24, 2026.

Configuration summary

SettingValue
Dravo platformfacebook
Meta productFacebook Login and Pages API
Publishable accountFacebook Page
Personal profile publishingNot supported
Callbackhttps://api.dravo.dev/v1/oauth/facebook/callback
Client identifierMeta App ID
Client secretMeta App Secret
Publish scopespages_show_list, pages_read_engagement, pages_manage_posts
Analytics scoperead_insights
Current Dravo publishingText, one image (JPEG/PNG/WEBP), or one video (MP4/MOV)

The callback is fixed for every Dravo customer. Do not replace api.dravo.dev with your product domain.

Complete Steps 1–7 using an app-role test user and a harmless Page. Request production access only after both OAuth and a real Page post work.

Step 1: Prepare the Facebook user and Page

You need a Facebook user with permission to manage content on a Page. An app role and Page access are separate: the same person needs both during development.

1.1 Confirm the Page exists

Navigation: Facebook → profile menu → See all profiles → select the Page.

  1. Sign in to Facebook as the person who will run the test.
  2. Open See all profiles and confirm the target Page appears.
  3. Switch into the Page and confirm you can create a normal test post manually.
  4. If no Page exists, create one before continuing.

1.2 Confirm Page access

Navigation with the Page selected: Facebook → Settings & privacy → Settings → Page setup → Page access. Meta may show the same destination under New Pages Experience.

  1. Find the testing user under People with Facebook access or task access.
  2. Confirm the user can create and manage Page content.
  3. If access is missing, ask a Page administrator with full control to add it.
  4. Accept any Page-access invitation before starting OAuth.

Following or moderating a Page is not enough. Dravo needs Meta to return that Page from /me/accounts together with a usable Page access token.

1.3 Reduce ambiguity during testing

Dravo connects every Page the user manages, creating one connected account per Page. For the first test, use a Facebook user that manages only the intended Page when possible, so there is a single account to publish from. If the person manages several Pages, identify the target account id in Step 7 before publishing.

Step 2: Create a Meta app and add Facebook Login

2.1 Register as a Meta developer

Navigation: Meta for DevelopersGet started. Existing developers see My Apps instead.

  1. Sign in with the Facebook account that should administer the integration.
  2. Accept Meta's platform terms.
  3. Complete identity, email, phone and two-factor verification when requested.
  4. Add a second organizational administrator before production.

2.2 Create the Business app

Navigation: Meta for Developers → My Apps → Create app.

  1. Choose a use case that includes Facebook Login and Page management. Meta may label it Authenticate and request data from users or expose Page access as a separate use case.
  2. If the wizard asks for an app type, choose Business.
  3. Enter the app display name and monitored contact email.
  4. Select the Business Portfolio that should own the app.
  5. Choose Create app and confirm the app opens in App Dashboard.

2.3 Add or customize Facebook Login

Current navigation: App Dashboard → Use cases → Facebook Login → Customize. In the classic layout use App Dashboard → Add products → Facebook Login → Set up.

  1. Add Facebook Login to the app if the selected use case did not add it.
  2. Select Web when Meta asks for a platform.
  3. Open the Facebook Login settings page.
  4. Keep Client OAuth Login and Web OAuth Login enabled when those switches are shown.

2.4 Complete the app details

Navigation: App Dashboard → App settings → Basic.

  1. Confirm the display name and contact email.
  2. Add your product's app domain.
  3. Add Privacy Policy and Terms of Service URLs.
  4. Add user data-deletion instructions or a deletion callback.
  5. Upload an icon, select a category and confirm the Business Portfolio.
  6. Complete Business Verification when Meta makes it available or required.

Step 3: Register the callback and Page permissions

3.1 Add Dravo's callback

Navigation: App Dashboard → Facebook Login → Settings or Use cases → Facebook Login → Customize → Settings.

Add this exact value under Valid OAuth Redirect URIs:

TEXT
https://api.dravo.dev/v1/oauth/facebook/callback
  1. Paste the complete URI without a wildcard, query string or fragment.
  2. Choose Save changes.
  3. Reload the page and confirm the URI remains present.
  4. Do not paste your frontend return_url; that URL is configured only in the Dravo OAuth app's allowed_return_urls list.

3.2 Enable the Page permissions

Navigation: App Dashboard → Use cases → Pages/Facebook Login → Customize → Permissions. In the classic layout use App Review → Permissions and Features.

Enable the exact scopes requested by Dravo for the capabilities you will use:

ScopeCapabilityWhy Dravo needs it
pages_show_listPublish + analyticsList Pages available to the Facebook user.
pages_read_engagementPublish + analyticsRead Page identity and context used by the publishing and analytics flows.
pages_manage_postsPublishPublish content to the Page.
read_insightsAnalyticsRead Page and post insights such as engagements, clicks, reactions, views and actions.

For each permission:

  1. Search for the exact name.
  2. Add it to the app use case or request the access level Meta displays.
  3. Confirm the selected publish and analytics permissions remain visible in the permissions list.
  4. Do not substitute deprecated permissions such as publish_actions.

Meta exchanges the user grant for Page tokens after consent. You do not copy a Page token into Dravo manually.

Step 4: Add a development tester

4.1 Add and accept the app role

Navigation: App Dashboard → App roles → Roles → Add people.

  1. Add the testing Facebook user as a developer or tester.
  2. Sign in as that person and accept the app-role invitation.
  3. Confirm that the same person still has content-management access to the Page from Step 1.
  4. Keep the app in development mode while running the first tests.

4.2 Check the two required relationships

Before continuing, verify both rows:

RelationshipWhere to check
User belongs to the Meta appApp Dashboard → App roles → Roles
User can manage the PageFacebook Page → Settings → Page setup → Page access

If either relationship is missing, OAuth may work partially but /me/accounts can return no usable Page.

Step 5: Copy the Meta credentials into Dravo

5.1 Reveal the Meta App ID and App Secret

Navigation: App Dashboard → App settings → Basic.

  1. Copy App ID (this is Dravo's client_id).
  2. Next to App Secret, choose Show.
  3. Confirm your Facebook password or two-factor challenge if requested.
  4. Copy the revealed secret (this is Dravo's client_secret).
  5. Never copy a user access token, Page token or Graph API Explorer token into the OAuth app form.

5.2 Save them from the Dravo dashboard

Navigation: Dravo Dashboard → Connections → OAuth apps → Add OAuth app.

  1. Select Facebook.
  2. Enter a recognizable name such as Production Facebook App.
  3. Paste the Meta App ID into Client ID.
  4. Paste the Meta App Secret into Client Secret.
  5. Confirm the callback, publish scopes and analytics scope shown by Dravo.
  6. Save the OAuth app.

5.3 Save them through the API

Endpoint: POST /v1/oauth-apps. Make this call from your backend.

Shell
curl -X POST https://api.dravo.dev/v1/oauth-apps \
  -H "Authorization: Bearer $DRAVO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "facebook",
    "name": "Production Facebook App",
    "client_id": "META_APP_ID",
    "client_secret": "META_APP_SECRET",
    "allowed_return_urls": [
      "https://app.acme.com/settings/connections"
    ]
  }'

The response must contain the fixed Facebook callback, the publish scopes and the analytics scope profile listed in Step 3. Dravo encrypts the secret and never returns it.

Step 6: Connect a Facebook Page

6.1 Connect from the dashboard

Navigation: Dravo Dashboard → Connections → Connected accounts → Connect account.

  1. Select Facebook.
  2. Choose the OAuth app saved in Step 5.
  3. Choose Connect with OAuth.
  4. Sign in as the development user from Step 4.
  5. Grant the requested Page publishing and analytics permissions.
  6. Complete the Meta consent flow and return to Dravo.

6.2 Connect from your backend

Endpoint: GET /v1/oauth/facebook/start.

Shell
curl --get "https://api.dravo.dev/v1/oauth/facebook/start" \
  -H "Authorization: Bearer $DRAVO_API_KEY" \
  --data-urlencode "oauth_app_id=YOUR_OAUTH_APP_ID" \
  --data-urlencode "capabilities=publish,analytics" \
  --data-urlencode "return_url=https://app.acme.com/settings/connections"

Redirect the browser to the returned authorize_url. The return_url must be present in the selected OAuth app's allowed_return_urls; it is not Meta's callback.

If you omit capabilities, Dravo requests the default publish scope set only. Use capabilities=publish,analytics for Page and post insights.

Step 7: Verify and publish test posts

7.1 Verify the connected Pages

Dashboard: Dravo Dashboard → Connections → Connected accounts. API: GET /v1/accounts?platform=facebook.

Check in this order:

  1. Confirm one account appears per Page the user manages.
  2. Confirm connection_type is oauth.
  3. Confirm each Page name and platform account id are correct.
  4. Confirm oauth_app_id identifies the intended Meta app.
  5. Confirm the publish scopes are stored.
  6. If analytics should work, confirm read_insights is also stored.
  7. Note the account id of the Page you intend to publish to.

7.2 Publish a text test

Navigation: Dravo Dashboard → Playground.

  1. Select only the new Facebook Page account.
  2. Publish a short text-only post.
  3. Open the Page and confirm the post appears under the correct identity.

7.3 Publish an image test

  1. Use a small public JPEG, PNG or WEBP, or upload/import it through Dravo media.
  2. Publish a post with one image and a short caption.
  3. Confirm both image and caption appear on the Page.

7.4 Publish a video test

  1. Use a small public MP4 or MOV.
  2. Publish a post with one video and a short description.
  3. Confirm the video processes and appears on the Page (allow time for Meta to transcode larger files).

Text, image and video tests exercise different Facebook endpoints (video uses Meta's Resumable Upload API). Passing only one is not a complete acceptance test.

Step 8: Request production access

8.1 Open App Review

Navigation: App Dashboard → App Review → Requests or Use cases → Pages/Facebook Login → Customize → Permissions → Request advanced access.

Meta may require Business Verification before the request form is available. Request production access only for the permissions Dravo uses.

8.2 Prepare the reviewer journey

Provide these items:

  1. An explanation that users connect a Page they are authorized to manage.
  2. A reason for pages_show_list and pages_read_engagement: find and display the Page selected for publishing and analytics.
  3. A reason for pages_manage_posts: publish content explicitly created or scheduled by the user.
  4. A reason for read_insights: show official Page and post performance metrics for Pages the user manages.
  5. Exact reviewer credentials and reproduction steps.
  6. A screencast showing Connect, Meta consent, Page identity, a published Page post and the analytics view if you request read_insights.
  7. Privacy policy, data deletion and disconnect behavior.

8.3 Retest outside app roles

  1. Submit the request and answer Meta's clarifications.
  2. Apply the required live/production status after approval.
  3. Repeat Step 7 with a Page manager who has no app role.
  4. Verify that every scope is present in the newly issued token.

Supported features

ContentCurrent supportBehavior
TextYesCreates a Page feed post.
One imageYesJPEG/PNG/WEBP via the Page photos endpoint; text becomes the caption.
One feed videoYesMP4/MOV via Meta's Resumable Upload API (upload session, transfer, publish); text becomes the description.
One ReelYesMP4/MOV published as a Reel when platform_options.facebook.as_reel is true (see below).
Page analyticsYesRequires read_insights; includes Page profile fields and Page insights Dravo can fetch.
Post analyticsYesRequires read_insights; available for posts with a usable Facebook post id.
Multiple mediaNoOne image or one video per post (MVP).
Personal profileNoFacebook platform/adapter boundary.

Dravo connects every Page the authorizing user manages as a separate account; choose the target Page by account id when publishing.

Publish a video as a Reel

By default a Facebook video is posted to the Page feed. To publish it as a Reel instead (Reels get more organic reach), set as_reel in platform_options:

JSON
{  "account_ids": ["YOUR_FACEBOOK_ACCOUNT_ID"],  "text": "My reel description",  "media_urls": ["https://cdn.acme.com/clip.mp4"],  "platform_options": { "facebook": { "as_reel": true } }}

Notes:

  1. Reels accept one MP4 or MOV.
  2. The media URL must be publicly reachable and allow Meta's facebookexternalhit/1.1 crawler. Meta CDN (fbcdn) URLs are rejected by Meta, and so are hosts that block the crawler via robots.txt.
  3. Feed videos require the Meta App id stored at connection time; Reels do not, because Meta fetches the file from the remote URL.

Meta enforces these Reel requirements (a video outside them fails during processing, and Dravo surfaces Meta's message such as "Resolution too low"):

PropertyRequirement
Aspect ratio9:16 (between 16:9 and 9:16 accepted)
Resolution1080 x 1920 recommended, 540 x 960 minimum
Duration3 to 90 seconds
Frame rate24 to 60 fps

Meta also rate-limits Reels to 30 published Reels per Page per 24 hours.

First comment

Set platform_options.facebook.first_comment to auto-post a comment on the new post right after publishing. It is best effort: if the comment cannot be created the post still counts as published and the reason appears in the result's warnings.

Troubleshooting

No Facebook Page is returned

  1. Confirm the user accepted the app role.
  2. Confirm the user has Page content-management access.
  3. Confirm pages_show_list was granted.
  4. Reconnect after fixing any missing relationship or permission.

Too many Pages were connected

Dravo connects every Page in /me/accounts as a separate account. Disconnect the Pages you do not need, or authorize with a user that manages only the intended Page. Always publish to the correct Page by account id.

"URL blocked" or redirect mismatch

  1. Open Facebook Login → Settings.
  2. Confirm the complete Dravo callback is in Valid OAuth Redirect URIs.
  3. Check scheme, host, path and trailing slash.
  4. Confirm Client OAuth Login and Web OAuth Login remain enabled.

A Page permission is missing

Enable the missing permission in the app use case, then disconnect and reconnect the Page. Existing tokens do not gain newly added permissions.

Facebook analytics are empty or partial

  1. Confirm read_insights is enabled on the Meta app.
  2. Start OAuth with capabilities=publish,analytics or connect from the Dravo dashboard.
  3. Confirm read_insights appears on the connected Page account.
  4. Reconnect after changing permissions; existing Page tokens keep the old grant.

OAuth works only for app administrators

The app is still in development or lacks production access. Complete Business Verification/App Review and retest with a newly issued token.

The Page token becomes invalid

The user may have changed password, lost Page access, removed the app or had the session invalidated by Meta. Restore the required Page access and reconnect via OAuth; do not paste a replacement Page token manually.

Official documentation

Next, read Configure OAuth and connect accounts for the shared browser flow and Posts for the unified post payload.