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.Get API KeySign up for free and get your API key in seconds.
- 2.Connect AccountUse our OAuth flow to connect Facebook accounts.
- 3.Start PostingMake API calls to post content to Facebook.
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
Create or schedule a Facebook post (text, photo, video, or link)
Get status and details of a Facebook post
Cancel a scheduled Facebook post
List all connected Facebook Pages and profiles
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Image | JPEG, PNG, GIF, BMP | 4 MB | 1200x630 recommended |
| Video | MP4, MOV | 10 GB | Up to 240 min duration |
| Carousel | JPEG, PNG | Up to 10 images | Square or landscape |
| Link | URL | N/A | Auto-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
{
"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

