API Reference

Facebook API

Facebook's Graph API requires app review, Page tokens, separate permissions per feature, and complex media upload flows. Zernio gives you one POST for Pages and Groups with photos, videos, and links.

Quick Start

  1. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect Facebook accounts.
  3. 3.
    Start Posting
    Make API calls to post content to Facebook.
Post to Facebook Page
JavaScript
const response = await fetch('https://zernio.com/api/v1/posts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    content: 'Check out our latest product update! ๐ŸŽ‰',
    mediaItems: [{ type: 'image', url: 'https://example.com/product.jpg' }],
    platforms: [{
      platform: 'facebook',
      accountId: 'acc_abc123'
    }],
    publishNow: true
  })
});

const post = await response.json();
console.log(post.post._id); // '65f1c0a9e2b5af0012ab34cd'

Facebook Endpoints

POST/v1/posts

Create or schedule a Facebook post (text, photo, video, or link)

GET/v1/posts/{id}

Get status and details of a Facebook post

DELETE/v1/posts/{id}

Cancel a scheduled Facebook post

GET/v1/profiles

List all connected Facebook Pages and profiles

Media Requirements

TypeFormatMax SizeNotes
ImageJPEG, PNG, GIF, BMP4 MB1200x630 recommended
VideoMP4, MOV10 GBUp to 240 min duration
CarouselJPEG, PNGUp to 10 imagesSquare or landscape
LinkURLN/AAuto-fetches preview

Zernio automatically transcodes and optimizes media for Facebook's requirements.

API Limits

Facebook's Graph API has rate limits based on your app's usage tier. Zernio manages rate limits automatically and retries failed requests.

Zernio handles all rate limiting automatically. We queue and retry requests as needed.

Features

  • โœ“Post to Facebook Pages and Groups
  • โœ“Schedule posts for optimal engagement
  • โœ“Photos, videos, and carousel support
  • โœ“Link posts with rich previews
  • โœ“Multi-page management
  • โœ“Webhook notifications for post status
  • โœ“Target audience settings

Response Example

Response
JSON
{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "content": "Check out our latest product update! ๐ŸŽ‰",
    "platforms": [{
      "platform": "facebook",
      "accountId": { "_id": "acc_abc123", "username": "YourPage" },
      "status": "published",
      "platformPostId": "123456789012345_987654321098765",
      "platformPostUrl": "https://facebook.com/123456789012345/posts/987654321098765"
    }],
    "publishedAt": "2025-01-10T10:30:00Z"
  },
  "message": "Post published successfully"
}

Start building with Facebook API

Free tier available ยท No credit card required ยท 99.97% uptime

SOC 2 CompliantGDPR Compliant