Facebook Page publishing API
Facebook Page Publishing API for Content Teams
Facebook publishing in Wahdx Connection targets connected Pages. The workflow handles text posts, single photos, multi-photo posts, and video through the same content endpoint as the other platforms, and reads Page analytics back per account. This page covers what the API can do, the Page connection and permissions, the post types, the limits, and the publish and reporting sequence.
What the Facebook API can do
The API publishes text-only posts up to 4000 characters, single photos, multi-photo posts, and video to a connected Facebook Page. It schedules posts up to 30 days ahead and reports queued, processing, published, or failed status per post. Page analytics then return unique impressions, post engagements, page views, and follows for the account that published, without mixing Facebook numbers with the other platforms.
- Text-only posts up to 4000 characters.
- Single photo, multi-photo post, and video.
- Schedule up to 30 days ahead.
- Per-post status tracking.
- Page analytics after publishing.
Page connection and permissions
Facebook publishing goes to a connected Page through Facebook Login with the pages_manage_posts permission. Personal profiles are not a publishing target. The connection is consent-based, and the account appears in the account listing endpoint with an accountId used for publishing. Expired accounts are returned by the listing so the interface can prompt for reconnection, but publishing requires an active account. Facebook, Instagram, and Threads each connect through their own official OAuth flow, so an account is added per platform.
Post types and media requirements
The backend detects the post type from the payload. Omitting mediaItems produces a text post, while sending image URLs produces a photo or multi-photo post and one video URL produces a video post. Mixing photos and video in one payload is rejected, so each post stays on one media type. Text-only posting is covered in more detail in the text posts guide.
| Post type | Requirement |
|---|---|
| Text-only | Up to 4000 characters, no mediaItems |
| Photo or multi-photo | One image URL per photo, multiple URLs for a multi-photo post |
| Video | Single video URL, platform format rules apply |
| Mixed payload | Rejected; one media type per post |
| Scheduling | Up to 30 days ahead |
| Required permission | pages_manage_posts |
const API_BASE_URL = 'https://api.wahdx.com';
const API_KEY = process.env.WAHDX_API_KEY;
const headers = {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
};
// Threads text-only post
await fetch(API_BASE_URL + '/api/content/post', {
method: 'POST',
headers,
body: JSON.stringify(
{
"platform": "threads",
"accountId": "THREADS_ACCOUNT_ID",
"content": "Threads text-only post with no media attached",
"threadsSettings": {
"who_can_reply": "everyone"
}
}
)
});
// Facebook Page text-only post
await fetch(API_BASE_URL + '/api/content/post', {
method: 'POST',
headers,
body: JSON.stringify(
{
"platform": "facebook",
"accountId": "FACEBOOK_ACCOUNT_ID",
"content": "Facebook Page text-only post with no media attached"
}
)
});import os
import requests
API_BASE_URL = 'https://api.wahdx.com'
API_KEY = os.environ['WAHDX_API_KEY']
headers = {
'X-API-Key': API_KEY,
'Content-Type': 'application/json',
}
# Threads text-only post
response = requests.post(
API_BASE_URL + '/api/content/post',
headers=headers,
json={
'platform': 'threads',
'accountId': 'THREADS_ACCOUNT_ID',
'content': 'Threads text-only post with no media attached',
'threadsSettings': {
'who_can_reply': 'everyone'
}
},
timeout=30,
)
# Facebook Page text-only post
response = requests.post(
API_BASE_URL + '/api/content/post',
headers=headers,
json={
'platform': 'facebook',
'accountId': 'FACEBOOK_ACCOUNT_ID',
'content': 'Facebook Page text-only post with no media attached'
},
timeout=30,
)# Threads text-only post
curl -X POST "https://api.wahdx.com/api/content/post" \
-H "X-API-Key: $WAHDX_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{
"platform": "threads",
"accountId": "THREADS_ACCOUNT_ID",
"content": "Threads text-only post with no media attached",
"threadsSettings": {
"who_can_reply": "everyone"
}
}'
# Facebook Page text-only post
curl -X POST "https://api.wahdx.com/api/content/post" \
-H "X-API-Key: $WAHDX_API_KEY" \
-H "Content-Type: application/json" \
--data-raw '{
"platform": "facebook",
"accountId": "FACEBOOK_ACCOUNT_ID",
"content": "Facebook Page text-only post with no media attached"
}'Publishing limits and scheduling
Posts can be published immediately or scheduled up to 30 days ahead, and the queue is processed server-side. Every scheduled post is validated against the selected account before it is queued, so a text post aimed at a media-only platform fails early instead of at publish time. Only successful publishes count toward the monthly upload quota, and failed posts stay visible in status tracking for a retry.
Publish sequence: endpoint to endpoint
A Facebook post is three calls. List connected accounts to find the Page accountId. Send the post to POST /api/content/post with either text content alone or media in mediaItems. Then poll GET /api/content/status/:accountId/:publishId until the post is published or failed. The platform field must match the connected account platform, or the request is rejected.
POST /api/content/post
X-API-Key: <server-side key>
Content-Type: application/json
{
"platform": "facebook",
"accountId": "CONNECTED_ACCOUNT_ID",
"content": "Post text up to 4000 characters"
}Reading metrics back
Facebook analytics cover unique impressions, post engagements, page views, and follows. The values come from the Page for the connected account, so they stay separate from the other platforms. Reading them alongside the publishing analytics endpoint shows both the volume of posts sent to Facebook and the response those posts received.
FAQ
Common questions about the Facebook API
Can Facebook publishing be coordinated with Instagram?
Yes. Both connect through Meta, and the workflow is designed for campaigns where Facebook and Instagram sit alongside the other social channels.
Does Facebook support text-only posts through the API?
Yes. Facebook Pages accept text-only posts up to 4000 characters. TikTok and Instagram do not accept media-less posts.
Can one Facebook post mix photos and video?
No. Keep each post to one media type, either photo-based or video-based, to avoid a rejected payload.
What Facebook metrics are available?
Unique impressions, post engagements, page views, and follows for the connected Page.
Related reading
Go deeper on this workflow.
Related API docs
TikTok Content Publishing API: Video, Photos & Carousels
Publish video and photo carousels to TikTok through an official API. Media specs, posting limits, QR login, scheduling, and status tracking in one workflow.
Instagram Graph API Content Publishing for Business Accounts
Publish photos, reels, and carousels to Instagram with the Content Publishing API. Business account requirements, media limits, and metrics.
YouTube API: Upload Videos and Read Channel Analytics
Upload videos to YouTube with per-video settings, then read subscribers, views, and video metrics through one API workflow.
Threads API: Text Posts, Thread Sequences & Metrics
Publish text posts and thread sequences to Threads via API. Character limits, scopes, reply settings, rate limits, and metrics read-back.