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
| Setting | Value |
|---|---|
| Dravo platform | facebook |
| Meta product | Facebook Login and Pages API |
| Publishable account | Facebook Page |
| Personal profile publishing | Not supported |
| Callback | https://api.dravo.dev/v1/oauth/facebook/callback |
| Client identifier | Meta App ID |
| Client secret | Meta App Secret |
| Publish scopes | pages_show_list, pages_read_engagement, pages_manage_posts |
| Analytics scope | read_insights |
| Current Dravo publishing | Text, 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.
- Sign in to Facebook as the person who will run the test.
- Open See all profiles and confirm the target Page appears.
- Switch into the Page and confirm you can create a normal test post manually.
- 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.
- Find the testing user under People with Facebook access or task access.
- Confirm the user can create and manage Page content.
- If access is missing, ask a Page administrator with full control to add it.
- 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 Developers → Get started. Existing developers see My Apps instead.
- Sign in with the Facebook account that should administer the integration.
- Accept Meta's platform terms.
- Complete identity, email, phone and two-factor verification when requested.
- Add a second organizational administrator before production.
2.2 Create the Business app
Navigation: Meta for Developers → My Apps → Create app.
- 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.
- If the wizard asks for an app type, choose Business.
- Enter the app display name and monitored contact email.
- Select the Business Portfolio that should own the app.
- 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.
- Add Facebook Login to the app if the selected use case did not add it.
- Select Web when Meta asks for a platform.
- Open the Facebook Login settings page.
- 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.
- Confirm the display name and contact email.
- Add your product's app domain.
- Add Privacy Policy and Terms of Service URLs.
- Add user data-deletion instructions or a deletion callback.
- Upload an icon, select a category and confirm the Business Portfolio.
- 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:
https://api.dravo.dev/v1/oauth/facebook/callback- Paste the complete URI without a wildcard, query string or fragment.
- Choose Save changes.
- Reload the page and confirm the URI remains present.
- Do not paste your frontend
return_url; that URL is configured only in the Dravo OAuth app'sallowed_return_urlslist.
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:
| Scope | Capability | Why Dravo needs it |
|---|---|---|
pages_show_list | Publish + analytics | List Pages available to the Facebook user. |
pages_read_engagement | Publish + analytics | Read Page identity and context used by the publishing and analytics flows. |
pages_manage_posts | Publish | Publish content to the Page. |
read_insights | Analytics | Read Page and post insights such as engagements, clicks, reactions, views and actions. |
For each permission:
- Search for the exact name.
- Add it to the app use case or request the access level Meta displays.
- Confirm the selected publish and analytics permissions remain visible in the permissions list.
- 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.
- Add the testing Facebook user as a developer or tester.
- Sign in as that person and accept the app-role invitation.
- Confirm that the same person still has content-management access to the Page from Step 1.
- Keep the app in development mode while running the first tests.
4.2 Check the two required relationships
Before continuing, verify both rows:
| Relationship | Where to check |
|---|---|
| User belongs to the Meta app | App Dashboard → App roles → Roles |
| User can manage the Page | Facebook 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.
- Copy App ID (this is Dravo's
client_id). - Next to App Secret, choose Show.
- Confirm your Facebook password or two-factor challenge if requested.
- Copy the revealed secret (this is Dravo's
client_secret). - 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.
- Select Facebook.
- Enter a recognizable name such as
Production Facebook App. - Paste the Meta App ID into Client ID.
- Paste the Meta App Secret into Client Secret.
- Confirm the callback, publish scopes and analytics scope shown by Dravo.
- Save the OAuth app.
5.3 Save them through the API
Endpoint: POST /v1/oauth-apps. Make this call from your backend.
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.
- Select Facebook.
- Choose the OAuth app saved in Step 5.
- Choose Connect with OAuth.
- Sign in as the development user from Step 4.
- Grant the requested Page publishing and analytics permissions.
- Complete the Meta consent flow and return to Dravo.
6.2 Connect from your backend
Endpoint: GET /v1/oauth/facebook/start.
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:
- Confirm one account appears per Page the user manages.
- Confirm
connection_typeisoauth. - Confirm each Page name and platform account id are correct.
- Confirm
oauth_app_ididentifies the intended Meta app. - Confirm the publish scopes are stored.
- If analytics should work, confirm
read_insightsis also stored. - Note the account id of the Page you intend to publish to.
7.2 Publish a text test
Navigation: Dravo Dashboard → Playground.
- Select only the new Facebook Page account.
- Publish a short text-only post.
- Open the Page and confirm the post appears under the correct identity.
7.3 Publish an image test
- Use a small public JPEG, PNG or WEBP, or upload/import it through Dravo media.
- Publish a post with one image and a short caption.
- Confirm both image and caption appear on the Page.
7.4 Publish a video test
- Use a small public MP4 or MOV.
- Publish a post with one video and a short description.
- 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:
- An explanation that users connect a Page they are authorized to manage.
- A reason for
pages_show_listandpages_read_engagement: find and display the Page selected for publishing and analytics. - A reason for
pages_manage_posts: publish content explicitly created or scheduled by the user. - A reason for
read_insights: show official Page and post performance metrics for Pages the user manages. - Exact reviewer credentials and reproduction steps.
- A screencast showing Connect, Meta consent, Page identity, a published Page
post and the analytics view if you request
read_insights. - Privacy policy, data deletion and disconnect behavior.
8.3 Retest outside app roles
- Submit the request and answer Meta's clarifications.
- Apply the required live/production status after approval.
- Repeat Step 7 with a Page manager who has no app role.
- Verify that every scope is present in the newly issued token.
Supported features
| Content | Current support | Behavior |
|---|---|---|
| Text | Yes | Creates a Page feed post. |
| One image | Yes | JPEG/PNG/WEBP via the Page photos endpoint; text becomes the caption. |
| One feed video | Yes | MP4/MOV via Meta's Resumable Upload API (upload session, transfer, publish); text becomes the description. |
| One Reel | Yes | MP4/MOV published as a Reel when platform_options.facebook.as_reel is true (see below). |
| Page analytics | Yes | Requires read_insights; includes Page profile fields and Page insights Dravo can fetch. |
| Post analytics | Yes | Requires read_insights; available for posts with a usable Facebook post id. |
| Multiple media | No | One image or one video per post (MVP). |
| Personal profile | No | Facebook 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:
{ "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:
- Reels accept one MP4 or MOV.
- The media URL must be publicly reachable and allow Meta's
facebookexternalhit/1.1crawler. Meta CDN (fbcdn) URLs are rejected by Meta, and so are hosts that block the crawler viarobots.txt. - 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"):
| Property | Requirement |
|---|---|
| Aspect ratio | 9:16 (between 16:9 and 9:16 accepted) |
| Resolution | 1080 x 1920 recommended, 540 x 960 minimum |
| Duration | 3 to 90 seconds |
| Frame rate | 24 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
- Confirm the user accepted the app role.
- Confirm the user has Page content-management access.
- Confirm
pages_show_listwas granted. - 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
- Open
Facebook Login → Settings. - Confirm the complete Dravo callback is in Valid OAuth Redirect URIs.
- Check scheme, host, path and trailing slash.
- 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
- Confirm
read_insightsis enabled on the Meta app. - Start OAuth with
capabilities=publish,analyticsor connect from the Dravo dashboard. - Confirm
read_insightsappears on the connected Page account. - 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
- Facebook Pages API — getting started
- Facebook Page insights
- Facebook Login manual OAuth flow
- Meta permissions reference
- Facebook access tokens
- Meta App Review
Next, read Configure OAuth and connect accounts for the shared browser flow and Posts for the unified post payload.