LateLate API
Platforms

Facebook API

Post to Facebook with Late API - Pages, Stories, Reels, and multi-image posts


Quick Start

Post to Facebook in under 60 seconds:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hello from Late API! 🚀",
    "platforms": [
      {"platform": "facebook", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Hello from Late API! 🚀',
    platforms: [
      { platform: 'facebook', accountId: 'YOUR_ACCOUNT_ID' }
    ],
    publishNow: true
  })
});

const { post } = await response.json();
console.log('Posted to Facebook!', post._id);
import requests

response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'Hello from Late API! 🚀',
        'platforms': [
            {'platform': 'facebook', 'accountId': 'YOUR_ACCOUNT_ID'}
        ],
        'publishNow': True
    }
)

post = response.json()
print(f"Posted to Facebook! {post['_id']}")

Image Requirements

PropertyFeed PostStory
Max Images101
FormatsJPEG, PNG, GIF, WebPJPEG, PNG
Max File Size10 MB10 MB
Recommended1200 × 630 px1080 × 1920 px
Min Dimensions200 × 200 px500 × 500 px

Aspect Ratios

TypeRatioDimensionsUse Case
Landscape1.91:11200 × 630 pxLink previews, standard
Square1:11080 × 1080 pxEngagement posts
Portrait4:51080 × 1350 pxMobile-optimized
Story9:161080 × 1920 pxStories only

Video Requirements

PropertyFeed VideoStory
Max Videos11
FormatsMP4, MOVMP4, MOV
Max File Size4 GB4 GB
Max Duration240 minutes120 seconds
Min Duration1 second1 second
ResolutionUp to 4K1080 × 1920 px
Frame Rate30 fps recommended30 fps
PropertyRecommended
Resolution1280 × 720 px (720p) min
Aspect Ratio16:9 (landscape), 9:16 (Stories)
CodecH.264
AudioAAC, 128 kbps stereo
Bitrate8 Mbps for 1080p

Multi-Image Posts

Facebook supports up to 10 images in a single post:

curl -X POST https://getlate.dev/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Photo dump from the weekend! 📸",
    "mediaItems": [
      {"url": "https://example.com/photo1.jpg"},
      {"url": "https://example.com/photo2.jpg"},
      {"url": "https://example.com/photo3.jpg"}
    ],
    "platforms": [
      {"platform": "facebook", "accountId": "YOUR_ACCOUNT_ID"}
    ],
    "publishNow": true
  }'
const response = await fetch('https://getlate.dev/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Photo dump from the weekend! 📸',
    mediaItems: [
      { url: 'https://example.com/photo1.jpg' },
      { url: 'https://example.com/photo2.jpg' },
      { url: 'https://example.com/photo3.jpg' }
    ],
    platforms: [
      { platform: 'facebook', accountId: 'YOUR_ACCOUNT_ID' }
    ],
    publishNow: true
  })
});
response = requests.post(
    'https://getlate.dev/api/v1/posts',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={
        'content': 'Photo dump from the weekend! 📸',
        'mediaItems': [
            {'url': 'https://example.com/photo1.jpg'},
            {'url': 'https://example.com/photo2.jpg'},
            {'url': 'https://example.com/photo3.jpg'}
        ],
        'platforms': [
            {'platform': 'facebook', 'accountId': 'YOUR_ACCOUNT_ID'}
        ],
        'publishNow': True
    }
)

Note: You cannot mix images and videos in the same post.

Facebook Stories

Stories are 24-hour ephemeral content. To post as a Story:

{
  "mediaItems": [
    { "url": "https://example.com/story.jpg" }
  ],
  "platforms": [
    {
      "platform": "facebook",
      "accountId": "acc_123",
      "platformSpecificData": {
        "contentType": "story"
      }
    }
  ]
}

Story Requirements

  • Media required - Stories must have an image or video
  • No text captions - Text won't display on Stories
  • Disappear after 24 hours
  • Recommended: 1080 × 1920 px (9:16)

First Comment

Add an automatic first comment to your post:

{
  "content": "New product launch! 🚀",
  "mediaItems": [
    { "url": "https://example.com/product.jpg" }
  ],
  "platforms": [
    {
      "platform": "facebook",
      "accountId": "acc_123",
      "platformSpecificData": {
        "firstComment": "Link to purchase: https://shop.example.com"
      }
    }
  ]
}

Note: First comments don't work with Stories.

Page Targeting

If you manage multiple Pages, specify which one:

{
  "platforms": [
    {
      "platform": "facebook",
      "accountId": "acc_123",
      "platformSpecificData": {
        "pageId": "123456789"
      }
    }
  ]
}

GIF Support

Facebook supports animated GIFs:

  • Treated as videos internally
  • Auto-play in feed
  • Max file size: 25 MB recommended
  • Loop automatically

Common Issues

"Cannot mix media types"

Facebook doesn't allow images and videos in the same post. Create separate posts for each.

Story has no caption

This is expected behavior. Facebook Stories don't display text captions. Add text as an image overlay instead.

Video processing taking long

Large videos (>100 MB) may take several minutes to process. Use scheduled posts for async processing.

Image looks cropped

Facebook auto-crops to fit feed. Use recommended aspect ratios (1.91:1, 1:1, or 4:5) for best results.