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.
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:
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/videoPublish 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 /mediaand use the returnedmediaId - Use
facebookFirstCommentto 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
Zsuffix) - Omit
scheduledDateto post immediately
Request Body
mediaIdstringrequiredThe ID of the uploaded video file. Obtain this from POST /media.
scheduledDatestringoptionalSchedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.
postsarrayrequiredArray of post objects. Include one object per Facebook Page you want to post to.
posts[].accountIdstringrequiredThe Facebook Page ID. Retrieve from GET /social-accounts.
posts[].captionstringrequiredThe video caption / description shown on the post.
posts[].facebookFirstCommentstringoptionalText to automatically post as the first comment immediately after publishing. Facebook exclusive.
Response
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/imagePublish 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
facebookFirstCommentto seed engagement with a pinned first comment - All datetime values must be in UTC timezone (ISO 8601 format with
Zsuffix)
Request Body
mediaIdstringrequiredThe ID of the uploaded image file. Obtain this from POST /media.
scheduledDatestringoptionalSchedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.
postsarrayrequiredArray of post objects. Include one object per Facebook Page.
posts[].accountIdstringrequiredThe Facebook Page ID. Retrieve from GET /social-accounts.
posts[].captionstringrequiredThe photo caption shown on the post.
posts[].facebookFirstCommentstringoptionalText to automatically post as the first comment immediately after publishing. Facebook exclusive.
Response
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/imagesPublish 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
facebookFirstCommentto add context or a CTA below the post - All datetime values must be in UTC timezone (ISO 8601 format with
Zsuffix)
Request Body
mediaIdsarrayrequiredOrdered array of image media IDs. Images appear in this order in the gallery.
scheduledDatestringoptionalSchedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.
postsarrayrequiredArray of post objects. Include one object per Facebook Page.
posts[].accountIdstringrequiredThe Facebook Page ID. Retrieve from GET /social-accounts.
posts[].captionstringrequiredThe gallery caption shown on the post.
posts[].facebookFirstCommentstringoptionalText to automatically post as the first comment immediately after publishing. Facebook exclusive.
Response
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/textFacebook ExclusivePublish 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
mediaIdormediaIds— this is a text-only post - Use
textFormatPresetIdto apply a visual background/style to the post - Text format presets only apply when the caption is short (Facebook enforces this)
- Use
facebookFirstCommentto add a CTA or link in the first comment - All datetime values must be in UTC timezone (ISO 8601 format with
Zsuffix)
Request Body
scheduledDatestringoptionalSchedule the post for a future time (ISO 8601 with 'Z' suffix). Omit to post immediately.
postsarrayrequiredArray of post objects. Include one object per Facebook Page.
posts[].accountIdstringrequiredThe Facebook Page ID. Retrieve from GET /social-accounts.
posts[].captionstringrequiredThe text content of the post. Keep short if using textFormatPresetId.
posts[].textFormatPresetIdstringoptionalA Facebook text format preset ID. Applies a visual background style to the post. See Text Formatting section below.
posts[].facebookFirstCommentstringoptionalText to automatically post as the first comment immediately after publishing. Facebook exclusive.
Response
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.
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 postSTRONG_WORDSBold text on a solid colored backgroundQUOTE_BUBBLEStyled as a speech bubble / quote cardARTISTICArtistic patterned backgroundSEASONALSeasonal themed background (varies by time of year)CELEBRATIONFestive / celebration themed backgroundFacebook 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