OverviewProductsPlatformsAPI ReferenceResources
All platforms

Facebook

Social Posting

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 guide
OAuth 2.0

Connect endpoints

Read the full connect steps in the guide

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

PropertyValue
Character limit63,206 (truncated at about 480 with "See more")
Images per post10
Videos per post1
Image formatsJPEG, PNG, GIF (WebP converted to JPEG)
Image max size4 MB (Facebook rejects larger files in practice)
Video formatsMP4, MOV
Video max size4 GB
Video max duration240 minutes (feed), 60 seconds (Reel), 120 seconds (Stories)
Post typesFeed (text, image, video, multi-image, link carousel), Story, Reel
SchedulingYes
Inbox (DMs)Yes
Inbox (comments)Yes
Inbox (reviews)Yes
Comment-to-DM automationsYes
AnalyticsYes

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.

TypeScript
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

Was this page helpful?

On this page