← All platforms

Facebook publishing API

Live

Publish text, links, photos or video to the Facebook Pages you administer. One connection yields one destination per Page.

Connect an account and publish today.

What this channel accepts

MediaOptional, one item
DestinationsOne per Page you administer
Option blockfacebook
Page tokensLong-lived, do not expire
Account reffacebook:page:<page-id>

Publish to Facebook

One request shape, the same across every channel. Register media first with POST /v1/media, then pass the handles it returns.

POST /v1/posts returns 202 with a post id; the publish itself is asynchronous.

const res = await fetch("https://creasionapp.com/v1/posts", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CREASION_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "accounts": [
      "facebook:page:1018678928004606",
      "facebook:page:1113743885156029"
    ],
    "content": "Two Pages, one request.",
    "facebook": {
      "link": "https://creasionapp.com"
    }
  }),
});

// 202 Accepted: the post is queued. Poll GET /v1/posts/{id}
// or wait for the post.completed webhook.
const { id } = await res.json();

Before you integrate

Pages only

The Graph API has no personal-profile publishing. Connecting Facebook adds one account per Page you administer, and each is addressed separately.

Fan-out is per destination

Listing several Pages in one request publishes to each independently. If one fails the post is reported partial, naming which destination failed and why.

Knowing what happened

Publishing is asynchronous, so the create call returns before the post exists on Facebook. Poll GET /v1/posts/{id} or register a webhook and receive post.completed instead. When a post targets several accounts, each destination reports its own result, so a partial success names exactly which one failed and why.

Read the API docsGet an API key