Quick reference
| Property | Value |
|---|---|
| Platform value | facebook |
| One connected account | One Facebook Page you manage (not a personal profile). |
| Text limit | 63,206 characters |
| Supported | Text or one image to a Page |
| Features | Posting ✓ · Analytics ✓ · Inbox ✓ |
| Provider approval | Meta review; Page permissions |
| Images per post | 1 |
| Token | Page token from a long-lived user token; no refresh token |
Before you start
The person connecting needs:
- A Facebook account that manages at least one Facebook Page (personal profiles cannot be connected).
- While your Meta app is in Development mode: a role on the app (Admin, Developer or Tester).
You (the platform owner) need:
- Create a Business app at developers.facebook.com and copy its App ID and App Secret (App settings → Basic).
- Add Facebook Login (or the “Manage everything on your Page” use case) with pages_show_list, pages_read_engagement and pages_manage_posts.
- Facebook Login → Settings → Valid OAuth Redirect URIs: https://YOUR_DOMAIN/auth/callback/facebook
- App settings → Basic → App domains: your domain.
- App roles: add the Facebook accounts that will test while the app is in Development mode.
Permissions (scopes)
Techrace puts these permissions in the login link. The person approves them on the provider's own screen; only approved permissions are granted.
| Permission | Requested by default | Used for |
|---|---|---|
pages_show_list | Yes | List the Pages the person manages (choose a Page) |
pages_read_engagement | Yes | Read Page content and engagement |
pages_manage_posts | Yes | Publish posts to the Page |
read_insights | Optional | Page analytics reports |
pages_read_user_content | Optional | Read comments |
pages_manage_engagement | Optional | Reply to, hide or delete comments |
pages_messaging | Optional | Read and reply to Page messages |
pages_manage_metadata | Optional | Message notifications (webhooks from Meta) |
Connect an account
/api/v1/projects/{project_id}/connect-sessionsconnections:writeCreate a connect link with provider "facebook" and send the person's browser to the returned url. return_url is the page in your app where they land afterwards (https, or http://localhost while testing).
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/connect-sessions" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"provider": "facebook",
"return_url": "https://your-app.com/integrations/done"
}
EOFAfter approval the person lands on your return_url with ?connected=facebook&customer_id=…&connection_id=…, or ?error=access_denied|expired|failed&provider=facebook. Your webhook also receives account.connected. Keep the connection_id: every call below uses it.
Publish a post
/api/v1/projects/{project_id}/executionsexecutions:writePublish text, or text with one image, to the connected Page.
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/executions" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-key-per-post" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"connection_id": "$CONNECTION_ID",
"action": "publish",
"input": {
"content": "Fresh croissants every morning 🥐",
"media_ids": [
"$MEDIA_ID"
]
}
}
EOF- Publishing is asynchronous: the response has status queued. Poll GET /executions/{id} or subscribe to execution.succeeded / execution.failed.
- Upload images or video first with POST /customers/{customer_id}/media and pass the returned media IDs in media_ids.
- Re-sending the same Idempotency-Key never posts twice.
- Text up to 63,206 characters.
Analytics
/api/v1/projects/{project_id}/analytics/queryanalytics:read| report | What it returns |
|---|---|
facebook_page_weekly | Page metrics per week |
facebook_page_28d | Page metrics for rolling 28-day periods |
daily | Daily Page metrics for since–until |
lifetime | Lifetime metrics for one post (content_id) |
curl -X POST "https://YOUR_DOMAIN/api/v1/projects/$TECHRACE_PROJECT_ID/analytics/query" \
-H "Authorization: Bearer $TECHRACE_API_KEY" \
-H "Content-Type: application/json" \
--data @- <<EOF
{
"customer_id": "$CUSTOMER_ID",
"connection_id": "$CONNECTION_ID",
"report": "facebook_page_weekly",
"since": "2026-11-01",
"until": "2026-11-07"
}
EOF- Needs the read_insights permission in addition to the defaults.
Limitations
- Pages only; personal profiles and Groups are not supported.
- One image per post; video, carousels and Reels are not supported for Pages.
- One Page belongs to one profile in a workspace.
Common errors
| Error | Meaning | Fix |
|---|---|---|
no_eligible_accounts | The person manages no Page (or none returned a Page token). | Log in with a Page admin account. |
connection_customer_conflict | This Page is already connected under another profile. | Disconnect it there first. |
access_denied | The person cancelled on Facebook. | Try again and approve the permissions. |
App not active (Facebook screen) | The Meta app is restricted or the account has no app role. | Check App roles and app status in the Meta dashboard. |
Comments and messages
/api/v1/projects/{project_id}/inbox/queryinbox:readRead conversations, messages, Page posts and their comments.
/api/v1/projects/{project_id}/inbox/operationsinbox:read + inbox:writeReply to a message or comment, hide or delete a comment, mark a conversation seen.