Publish feed posts, multi-image posts, link carousels, Stories and Reels to a Facebook Page with the Zernio API, with drafts, first comments and country targeting.
Authentication details
Connecting accounts guideOAuth 2.0
Connect endpoints
GET /v1/connect/facebook/select-pageList Facebook pagesPOST /v1/connect/facebook/select-pageSelect Facebook page
Permissions9 scopes
- Always requested
- Posting
- Analytics
- Comments
- Messaging
- Ads
Pass scopes=posting,analytics to the connect endpoint to ask only for those areas. The first row comes with every connection.
Publish feed posts, multi-image posts, link carousels, Stories and Reels to a Facebook Page with POST /v1/posts and platform: "facebook".
The same account also serves analytics, Messenger DMs, comments, Page reviews and comment-to-DM automations.
Quick reference
| Property | Value |
|---|---|
| Character limit | 63,206 (truncated at about 480 with "See more") |
| Images per post | 10 |
| Videos per post | 1 |
| Image formats | JPEG, PNG, GIF (WebP converted to JPEG) |
| Image max size | 4 MB (Facebook rejects larger files in practice) |
| Video formats | MP4, MOV |
| Video max size | 4 GB |
| Video max duration | 240 minutes (feed), 60 seconds (Reel), 120 seconds (Stories) |
| Post types | Feed (text, image, video, multi-image, link carousel), Story, Reel |
| Scheduling | Yes |
| Inbox (DMs) | Yes |
| Inbox (comments) | Yes |
| Inbox (reviews) | Yes |
| Comment-to-DM automations | Yes |
| Analytics | Yes |
Before you start
Facebook requires a Page. Personal profiles cannot post through the API, and the user must be an Admin or Editor of the Page.
One connected account can manage several Pages (Post to several Pages).
Facebook tokens expire frequently, so subscribe to the account.disconnected webhook.
Connect
Call GET /v1/connect/facebook with profileId on Get OAuth connect URL.
After OAuth, the user picks which Page to connect, in standard or headless mode. See platforms requiring secondary selection.
The connecting accounts guide covers the OAuth flow and scopes in general. Account health reports what a connected account can do with the scopes the user granted.
A Meta Ads connection is a separate metaads account. It does not serve organic posting or Page Insights.
Connections and billing explains how the two relate and how each is billed.
OAuth scopes
The consent screen also requests ads_management, ads_read, pages_manage_ads and leads_retrieval (the ads area). The same token can then drive Meta Ads and lead forms.
Pass scopes to ask for fewer areas.
pages_manage_metadata comes with every area except analytics, because it subscribes the Page to webhooks. A scopes=analytics connect is read-only: it cannot change the Page, and the Page gets no webhooks.
Accounts connected before ads were included need a reconnect to pick the ads scopes up.
Publish a post
This request publishes an image post to a Facebook Page right away.
import Zernio from '@zernio/node';
const zernio = new Zernio();
const { data: published } = await zernio.posts.createPost({
body: {
content: 'New collection in store from Monday',
mediaItems: [
{ type: 'image', url: 'https://cdn.example.com/collection.jpg' }
],
platforms: [
{ platform: 'facebook', accountId: '66b2e19d8c3f5a7e9d0b1c2d' }
],
publishNow: true
}
});
console.log(published.post.platforms[0].platformPostUrl);Every option is on Posts, Stories & Reels.
In this section
Posts, Stories & Reels
Publish feed posts, multi-image posts, link carousels, Stories and Reels to a Facebook Page, plus every platformSpecificData field.
Media requirements
Image and video requirements for Facebook posts, custom video thumbnails, and the rules for media URLs.
Analytics
Which analytics metrics Facebook returns for Page posts.
Inbox
Messenger direct messages, the welcome screen, the persistent menu, comments, Page reviews and inbox webhooks.
Limits & errors
What Facebook's API does not expose and the common errors when publishing.
Related
- Connecting accounts: the OAuth flow and the Page selection step.
- Create post: every field of the request.
- Media uploads: upload images and videos instead of hosting them.
- Messages, Comments and Reviews: the inbox API.
- Meta Ads: run ads from the same connection.
- ManyChat-style automations: ref links, comment to DM, welcome screen and handover.
- Pricing: what analytics, the inbox and outbound messages cost.
- GET
- GET
- GET
- GET
- POST
- GET
- DELETE
- GET
- GET
- GET
- POST
- GET
Publishing
24· Unified API, shared with other platforms- POST
- POST
- POST
- POST
- GET
- POST
- GET
- PUT
- DELETE
- POST
- POST
- POST
Analytics
8· Unified API, shared with other platforms- GET
- GET
- GET
- GET
- GET
- GET
- GET
- GET
Direct messages
24· Unified API, shared with other platforms- GET
- POST
- GET
- GET
- PUT
- DELETE
- GET
- POST
- PATCH
- DELETE
- POST
- POST
Comments
15· Unified API, shared with other platforms- GET
- GET
- POST
- DELETE
- PATCH
- POST
- POST
- DELETE
- POST
- DELETE
- POST
- DELETE
Reviews
3· Unified API, shared with other platforms- GET
- POST
- DELETE