Platform GuidesHow to Schedule Facebook Posts via API

How to Schedule Facebook Posts via API

Schedule Facebook posts programmatically with the SocialRails API. Covers character limits, page selection, Reels, media support, rate limits, and code examples for automated Facebook posting.

Schedule Facebook posts programmatically using the SocialRails API. This guide covers character limits, supported content types, page selection, code examples, and best practices for automated Facebook posting.

Character Limits

  • Regular posts: 63,206 characters
  • Comments: 8,000 characters
  • URLs: Automatically generate link previews when included in post text
  • Ad copy: 125 characters recommended for primary text

Supported Content Types

TypeSupportedNotes
Text postsYesUp to 63,206 characters
ImagesYesUp to 10 images per post (JPEG, PNG, WebP)
VideosYesReels or regular video posts
LinksYesAuto-preview when URL included in text
StoriesNoNot supported via API

API Example

# Schedule a Facebook post to a specific page
curl -X POST https://socialrails.com/api/v1/posts \
  -H "Authorization: Bearer sr_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Excited to announce our latest product update! Check it out at socialrails.com",
    "platform": "facebook",
    "scheduled_for": "2026-03-15T10:00:00Z",
    "platform_settings": {
      "facebook": {
        "selectedPage": "PAGE_ID"
      }
    }
  }'

Posting to Pages

Facebook posting requires selecting a page. Use the selectedPage field in platform settings to specify which page to post to.

Discover your pages by calling the tools endpoint:

curl -X POST https://socialrails.com/api/v1/accounts/:id/tools \
  -H "Authorization: Bearer sr_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tool": "pages"
  }'
  • selectedPage: Required. The ID of the Facebook page to post to.
  • selectedPages: Post to multiple pages at once by passing an array of page IDs.
  • videoType: Set to "reel" for Reels or "post" for regular video posts.
# Post to multiple pages with a Reel
curl -X POST https://socialrails.com/api/v1/posts \
  -H "Authorization: Bearer sr_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out our latest Reel!",
    "platform": "facebook",
    "media": ["MEDIA_KEY_FROM_UPLOAD"],
    "scheduled_for": "2026-03-15T10:00:00Z",
    "platform_settings": {
      "facebook": {
        "selectedPages": ["PAGE_ID_1", "PAGE_ID_2"],
        "videoType": "reel"
      }
    }
  }'

Best Practices

  • Native video: Gets 10x more reach compared to shared link videos
  • Reels: Outperform regular video posts in reach and engagement
  • Optimal posting times: Tuesday-Thursday, 9am-12pm in your audience's timezone
  • External links: Avoid external links in organic posts, Facebook deprioritizes them in the algorithm
  • Image posts: Use high-quality visuals, posts with images see 2.3x more engagement
  • Post consistently to build audience trust and algorithmic favor

Rate Limits

Facebook's Graph API limits apply in addition to SocialRails rate limits:

  • 200 posts per hour per page
  • Media uploads: 25 images per hour
  • API calls: 200 calls per user per hour

SocialRails handles these limits automatically and will retry failed posts.

Frequently Asked Questions

What is the character limit for Facebook API posts?
Facebook allows up to 63,206 characters per regular post. URLs included in the post text automatically generate link previews. For ad copy, Facebook recommends keeping primary text under 125 characters for optimal display.
Can I schedule Facebook posts through an API?
Yes. The SocialRails API lets you schedule Facebook posts by sending a POST request to /api/v1/posts with the platform set to 'facebook' and a scheduled_for timestamp. You must specify a selectedPage in the platform_settings to indicate which Facebook page to post to.
How do I select which Facebook page to post to?
Use the selectedPage field in platform_settings.facebook with the page ID. You can discover your available pages by calling POST /accounts/:id/tools with {"tool": "pages"}. To post to multiple pages at once, use the selectedPages array instead.
What is the difference between Facebook Reels and regular video posts?
Reels are short-form vertical videos that appear in a dedicated Reels tab and get significantly more reach than regular video posts. Set videoType to 'reel' in platform_settings.facebook. Regular video posts use videoType 'post' and appear in the standard news feed.