Facebook API

Use the Crosspostify API to publish videos, photos, carousels, and text posts to Facebook Pages — including first comments, text formatting presets, and scheduling.

Post Types
Video · Photo · Carousel · Text
First Comment
Supported
Text Formatting
Presets supported
Account Type
Facebook Pages only

Facebook is the world's largest social network. The Crosspostify Facebook API integration supports publishing to Facebook Pages — with unique features like first comment automation and text formatting presets that are exclusive to Facebook.

This page covers everything specific to Facebook when using the Crosspostify API. For general authentication, rate limits, and error handling, see the full API Reference.

Facebook-Specific Parameters

Facebook supports two exclusive parameters not available on other platforms: facebookFirstComment and textFormatPresetId. These can be used on any Facebook post type.

accountId✓ AppliesRequired. Your Facebook Page ID from /social-accounts.
caption✓ AppliesRequired for all post types. The main post text.
facebookFirstComment✓ AppliesFacebook exclusive. Automatically posts a first comment after publishing.
textFormatPresetId✓ AppliesFacebook exclusive. Applies a text style preset to text-only posts.
title✗ IgnoredTikTok only — ignored for Facebook.
is_aigc✗ IgnoredTikTok only — ignored for Facebook.
boardId✗ IgnoredPinterest only — ignored for Facebook.
link✗ IgnoredPinterest only — ignored for Facebook.

Supported Endpoints

Facebook supports the most post types of any platform on Crosspostify — including the exclusive /post/text endpoint:

Facebook Pages only

The Crosspostify API publishes to Facebook Pages, not personal profiles. Personal Facebook profiles are not supported by the Facebook Graph API for third-party publishing.

POST/post/video

Publish a video to a Facebook Page. Supports scheduling, first comment automation, and all standard Facebook post options.

Facebook Video Notes

  • Upload your video first via POST /media and use the returned mediaId
  • Use facebookFirstComment to automatically post a comment right after publishing
  • Recommended aspect ratio: 16:9 (landscape) or 9:16 (vertical) for Reels-style
  • All datetime values must be in UTC timezone (ISO 8601 format with Z suffix)
  • Omit scheduledDate to post immediately

Request Body

mediaIdstringrequired

The ID of the uploaded video file. Obtain this from POST /media.

scheduledDatestringoptional

Schedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.

postsarrayrequired

Array of post objects. Include one object per Facebook Page you want to post to.

posts[].accountIdstringrequired

The Facebook Page ID. Retrieve from GET /social-accounts.

posts[].captionstringrequired

The video caption / description shown on the post.

posts[].facebookFirstCommentstringoptional

Text to automatically post as the first comment immediately after publishing. Facebook exclusive.

Response

{ "success": true, "data": { "postId": "post_ghi789", "status": "PROCESSING", "scheduledDate": "2025-06-01T14:00:00Z", "videoDuration": 62, "accounts": [ { "accountId": "acc_facebook_789", "platform": "facebook", "status": "PROCESSING" } ] } }

Code Example

curl -X POST "https://v1.api.crosspostify.com/post/video" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaId": "vid_12345",
    "scheduledDate": "2025-06-01T14:00:00Z",
    "posts": [
      {
        "accountId": "acc_facebook_789",
        "caption": "Check out our latest video! 🎬 #facebook",
        "facebookFirstComment": "What do you think? Drop a comment below! 👇"
      }
    ]
  }'
POST/post/image

Publish a single photo to a Facebook Page feed.

Facebook Photo Notes

  • Facebook accepts most common aspect ratios without cropping
  • Recommended dimensions: at least 1200×630px for best feed display
  • Use facebookFirstComment to seed engagement with a pinned first comment
  • All datetime values must be in UTC timezone (ISO 8601 format with Z suffix)

Request Body

mediaIdstringrequired

The ID of the uploaded image file. Obtain this from POST /media.

scheduledDatestringoptional

Schedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.

postsarrayrequired

Array of post objects. Include one object per Facebook Page.

posts[].accountIdstringrequired

The Facebook Page ID. Retrieve from GET /social-accounts.

posts[].captionstringrequired

The photo caption shown on the post.

posts[].facebookFirstCommentstringoptional

Text to automatically post as the first comment immediately after publishing. Facebook exclusive.

Response

{ "success": true, "data": { "postId": "post_abc123", "status": "SCHEDULED", "scheduledDate": "2025-06-01T14:00:00Z", "accounts": [ { "accountId": "acc_facebook_789", "platform": "facebook", "status": "SCHEDULED" } ] } }

Code Example

curl -X POST "https://v1.api.crosspostify.com/post/image" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaId": "img_12345",
    "scheduledDate": "2025-06-01T14:00:00Z",
    "posts": [
      {
        "accountId": "acc_facebook_789",
        "caption": "Beautiful day at the office 🌟",
        "facebookFirstComment": "Tag someone who needs to see this!"
      }
    ]
  }'
POST/post/images

Publish a multi-photo post to a Facebook Page. Facebook displays multiple images as a photo album or inline gallery in the feed.

Facebook Multi-Photo Notes

  • Images are displayed in the order provided in mediaIds
  • Facebook renders multiple images as an inline gallery in the feed
  • Use facebookFirstComment to add context or a CTA below the post
  • All datetime values must be in UTC timezone (ISO 8601 format with Z suffix)

Request Body

mediaIdsarrayrequired

Ordered array of image media IDs. Images appear in this order in the gallery.

scheduledDatestringoptional

Schedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.

postsarrayrequired

Array of post objects. Include one object per Facebook Page.

posts[].accountIdstringrequired

The Facebook Page ID. Retrieve from GET /social-accounts.

posts[].captionstringrequired

The gallery caption shown on the post.

posts[].facebookFirstCommentstringoptional

Text to automatically post as the first comment immediately after publishing. Facebook exclusive.

Response

{ "success": true, "data": { "postId": "post_def456", "status": "SCHEDULED", "scheduledDate": "2025-06-01T14:00:00Z", "mediaCount": 3, "accounts": [ { "accountId": "acc_facebook_789", "platform": "facebook", "status": "SCHEDULED" } ] } }

Code Example

curl -X POST "https://v1.api.crosspostify.com/post/images" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaIds": ["img_001", "img_002", "img_003"],
    "scheduledDate": "2025-06-01T14:00:00Z",
    "posts": [
      {
        "accountId": "acc_facebook_789",
        "caption": "Swipe through our latest collection 👉",
        "facebookFirstComment": "Which one is your favourite?"
      }
    ]
  }'
POST/post/textFacebook Exclusive

Publish a text-only post to a Facebook Page. Optionally apply a visual text formatting preset to make the post stand out in the feed.

Facebook Text Post Notes

  • No mediaId or mediaIds — this is a text-only post
  • Use textFormatPresetId to apply a visual background/style to the post
  • Text format presets only apply when the caption is short (Facebook enforces this)
  • Use facebookFirstComment to add a CTA or link in the first comment
  • All datetime values must be in UTC timezone (ISO 8601 format with Z suffix)

Request Body

scheduledDatestringoptional

Schedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.

postsarrayrequired

Array of post objects. Include one object per Facebook Page.

posts[].accountIdstringrequired

The Facebook Page ID. Retrieve from GET /social-accounts.

posts[].captionstringrequired

The text content of the post. Keep short if using textFormatPresetId.

posts[].textFormatPresetIdstringoptional

A Facebook text format preset ID. Applies a visual background style to the post. See Text Formatting section below.

posts[].facebookFirstCommentstringoptional

Text to automatically post as the first comment immediately after publishing. Facebook exclusive.

Response

{ "success": true, "data": { "postId": "post_txt001", "status": "SCHEDULED", "scheduledDate": "2025-06-01T14:00:00Z", "accounts": [ { "accountId": "acc_facebook_789", "platform": "facebook", "status": "SCHEDULED" } ] } }

Code Example

curl -X POST "https://v1.api.crosspostify.com/post/text" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "scheduledDate": "2025-06-01T14:00:00Z",
    "posts": [
      {
        "accountId": "acc_facebook_789",
        "caption": "Big announcement coming tomorrow. Stay tuned! 👀",
        "textFormatPresetId": "STRONG_WORDS",
        "facebookFirstComment": "Set a reminder so you don\'t miss it!"
      }
    ]
  }'

First Comment

The facebookFirstComment parameter lets you automatically post a comment on your own post immediately after it goes live. This is a popular strategy for boosting engagement — for example, putting hashtags or a link in the first comment rather than the caption.

Common use cases

  • Add hashtags without cluttering the caption
  • Include a link (e.g. "Link in first comment")
  • Seed a question to drive replies
  • Add a CTA after the post goes live
  • Pin a discount code or promo link

How it works

  • Comment is posted by the Page itself
  • Posted immediately after the main post goes live
  • Works on all 4 Facebook post types
  • Plain text only — no media attachments
  • Max ~8,000 characters (Facebook comment limit)

Text Formatting Presets

Facebook allows text-only posts to have a visual background style applied via textFormatPresetId. These presets render the post with a colored or patterned background, making it stand out in the feed.

Short captions only

Facebook only applies text format presets when the caption is short (typically under ~130 characters). Longer captions will render as a standard text post regardless of the preset specified.

Available Preset IDs

NONENo formatting — standard plain text post
STRONG_WORDSBold text on a solid colored background
QUOTE_BUBBLEStyled as a speech bubble / quote card
ARTISTICArtistic patterned background
SEASONALSeasonal themed background (varies by time of year)
CELEBRATIONFestive / celebration themed background
Preset availability may vary

Facebook periodically updates available text format presets. If a preset ID is not recognized, the post will fall back to a standard text post without formatting. Check the API Reference for the latest list of supported preset IDs.

Content Guidelines

Facebook accepts a wide range of media formats and is generally more lenient than Instagram on aspect ratios. However, following these recommendations ensures the best feed presentation.

Video Requirements

  • Format: MP4 or MOV recommended
  • Max file size: 100MB via Crosspostify
  • Recommended ratio: 16:9 or 9:16
  • Min resolution: 720p recommended
  • Max duration: 240 minutes

Photo Requirements

  • Format: JPG or PNG
  • Max file size: 20MB via Crosspostify
  • Recommended: 1200×630px (1.91:1)
  • Most aspect ratios accepted without cropping
  • Min width: 600px recommended

Caption Best Practices

  • No hard character limit (very long captions supported)
  • Hashtags supported but less impactful than on Instagram
  • Links in captions generate link previews
  • Emojis are fully supported
  • Use first comment for hashtags/links instead

Scheduling

  • Minimum lead time: ~10 minutes ahead
  • All times must be UTC (ISO 8601 + Z)
  • Omit scheduledDate to post immediately
  • Max scheduling window: 6 months ahead