---
title: "Facebook API"
description: "Use Ayrshare's Facebook API to publish posts, reels, and stories, schedule them, and get analytics for your users, without waiting on Meta's app review."
canonical: https://www.ayrshare.com/facebook-api/
lastModified: 2026-10-29
pageType: landing
---

# Facebook API

> Use Ayrshare's Facebook API to publish posts, reels, and stories, schedule them, and get analytics for your users, without waiting on Meta's app review.

## Facebook API for Posting, Scheduling, and Analytics

Ayrshare's Facebook API lets developers publish posts, photos, videos, reels, and stories to Facebook Pages via a single REST endpoint. It supports scheduled posts, audience targeting, comments, Messenger, reviews, boosted ads, and analytics across 14+ social networks through one integration.

Your users link their own Facebook Pages through an OAuth flow inside your product, on Ayrshare's approved Meta app. You don't need your own App Review, Business Verification, or Page tokens.

[Read the Facebook Docs](/docs/apis/post/social-networks/facebook)
[Get Your API Key](/pricing/)

- **4 hours** — max Facebook video length
- **63,206** — caption characters
- **30M+** — API calls handled daily
- **99.99%** — API uptime

## What Do You Need to Use the Facebook API?

Meta's Graph API is free to call, but posting to your customers' Pages takes setup before your first request. You need a Meta developer app, the pages_manage_posts permission with its two prerequisites, Advanced Access through Meta's App Review, and Business Verification. Reviews usually take one to three weeks, and a first rejection is common.

With Ayrshare, you skip App Review and Business Verification: your users link their Pages and you post on the same day.

- **Access**: A Meta developer app, App Review for Advanced Access, and Business Verification. Standard Access only works on Pages your own developer account manages.
- **Cost**: No fee per call. The cost is engineering time: the review, a Data Use Checkup every 12 months, token upkeep, and Graph API version upgrades.
- **Account types**: Facebook Pages only, linked by one of the Page's admins. Meta's API doesn't allow posting to personal profiles or groups.
- **Key limits**: Each Page gets a call budget that scales with its engaged users, and Meta allows 30 reels per Page in any 24 hours.

## Post and Schedule to Facebook in Your Language

Each sample publishes a photo post with a link now, then schedules a video for later. Same endpoint, same JSON, in Node.js, Python, PHP, Java, Go, Ruby, C#, or plain cURL. Add a Profile-Key header to post for one of your users.

[Full Post API Reference](/docs/apis/post/overview)

- **cURL**
- **Node.js**
- **Python**
- **PHP**
- **Java**
- **Go**
- **Ruby**
- **C#**

## Facebook API Limits: Post Types, Media, and Characters

Meta's rules in one place. The full list lives in the [Facebook media guidelines](/docs/media-guidelines/facebook_pages) and the [Facebook publishing options](/docs/apis/post/social-networks/facebook).

- **2 to 10 cards per link carousel (Post types)**: Text, links with automatic previews, photos, video, reels, stories, animated GIFs, and link carousels, on Facebook Pages linked by a Page admin. One post can't mix photos and video.
- **10 MB per image (Images)**: JPEG, PNG, BMP, GIF, or TIFF, up to 2048 px on each side. 1200 x 630 px is the recommended size.
- **10 GB per video (Video)**: MP4, MOV, or AVI, up to 4 hours. 16:9 landscape or 9:16 portrait, up to 30 FPS. Titles run to 255 characters.
- **63,206 characters (Characters)**: Line breaks, bold and italic text, and @mentions of other Pages. Per-image captions and alt text are supported.
- **30 reels per Page per 24 hours (Reels)**: 9:16 video from 3 to 90 seconds, up to 2 GB, at least 540 x 960 px.
- **60 sec max video story (Stories)**: One photo or one video. Stories don't carry post text, and the media can't have been used in an earlier post.
- **25 countries per post (Audience targeting)**: Limit a post by minimum age and country, or tilt the feed toward an age range, gender, or relationship status.
- **300 API calls per 5 minutes per profile (Scheduling and limits)**: Schedule through Ayrshare for any date, or hand the post to Meta Business Suite with scheduledPublishDate, 10 minutes to 29 days out. The 300-call limit is Ayrshare's.

- **Publish reels with a cover and a collaborator**: Set the reels flag on a video post. Add a title, a cover image, and one collaborator Page, which Facebook invites after the reel publishes.
- **Post photo and video stories**: Send a photo or a short video with the stories flag. Stories ignore post text, a video story runs up to 60 seconds, and the media can't have been used in an earlier post. Turn on Stories Archive on the Page to read them back later.
- **Post a link carousel of 2 to 10 cards**: Each card has its own image and link, with a See More button at the end. Between 2 and 10 cards per post.
- **Target posts by age and country**: targeting sets a hard limit on who can see the post: a minimum age (13, 15, 18, 21, or 25) and up to 25 country codes. feedTargeting tilts the feed toward the people more likely to engage. Alt text rides along in the same request.
- **Boost a published post into an ad**: Boost a published post with a goal, budget, and targeting through the Ads API. Ayrshare creates the campaign, ad set, and ad in Meta Ads Manager and reports spend and results back. Boosting needs the Ads add-on and a payment method on the Meta ad account, and Facebook reviews boosted posts within about 24 hours.

## Why Use Ayrshare Instead of the Facebook API Directly?

Ayrshare runs the Meta app, so your product sends one request and gets back the Facebook post ID and URL. Ayrshare handles the Page linking flow, media upload, link previews, reels processing, and token renewal. When Meta retires a Graph API version or changes a field, the fix ships on our side, not in your sprint.

For a step-by-step walkthrough, read [How to Post to a Facebook Page with an API](/blog/facebook-api-how-to-post-and-get-analytics-using-the-facebook-api/).

[See the Facebook Publishing Options](/docs/apis/post/social-networks/facebook)

- **One simple endpoint**: Send one POST request with your post, media URL, and the user's Profile-Key. We do the maintenance, Meta's app audits, and policy enforcement that keep it working.
- **We deal with Meta**: OAuth tokens, token refresh, media upload, link previews, and reels processing. All data is encrypted at rest and in transit.
- **Your data comes back**: Get the live post URL and ID right away, then use the same id to pull the post's analytics and comments, boost it, or edit it.

## Beyond Posting: The Rest of the Facebook Lifecycle

Facebook is where Ayrshare covers the most ground. Everything below runs through the same Page connection as posting.

Not available on Facebook: posting to personal profiles or groups, and story analytics, which Meta doesn't provide. See every network you can reach with the same integration on the [supported networks page](/supported-networks/).

- **Analytics**: Post and Page metrics in the same JSON shape as every other network. Meta updates them about once a day.
  - [Analytics API](/social-media-analytics-api/)
- **Comments and reviews**: Read up to the 1,000 most recent comments on a post, reply with text or an image, and delete. Read and reply to Page ratings and reviews too.
  - [Engagement API](/social-media-engagement-api/)
- **Messages**: Read and send Facebook Messenger conversations for each Page, with auto-responses and webhooks for new messages.
  - [Messaging API](/social-media-messenger-apis/)
- **Boosted ads**: Boost a Page post into an ad with goals, budgets, targeting, and daily insights.
  - [Ads API docs](/docs/apis/ads/overview)
- **History**: Pull a Page's past posts and stories with metrics, including posts published outside Ayrshare, filtered by date.
  - [History API](/history-api/)

## FAQs About the Facebook API

### Can I post to Facebook through an API?

Yes, you can post to Facebook through an API. Ayrshare's Facebook API lets developers publish posts, photos, videos, reels, and stories to Facebook Pages via a single REST endpoint. It supports scheduled posts, audience targeting, comments, Messenger, reviews, boosted ads, and analytics across 14+ social networks through one integration. Start with the [Facebook publishing options](/docs/apis/post/social-networks/facebook).
### Is the Facebook API free?

The Facebook API is free to call, since Meta doesn't charge per request for the Graph API. Going direct costs you setup and upkeep instead: App Review, Business Verification, a yearly Data Use Checkup, and Graph API version upgrades. Ayrshare's plans include Facebook Page posting on Ayrshare's approved Meta app, so you can start posting without waiting on review. [Compare Ayrshare plans](/pricing/).
### How do I get access to the Facebook API?

To get access to the Facebook API, create a Meta developer app, request the Page permissions you need, complete Business Verification, and pass App Review for Advanced Access. Reviews usually take one to three weeks. With Ayrshare, your users link their Pages through Ayrshare's approved app, and the [Post API reference](/docs/apis/post/overview) shows the one request you need.
### What permissions does the Facebook API require?

The Facebook API requires pages_manage_posts to publish to a Page, and Meta only grants it together with pages_read_engagement and pages_show_list. Comments, Messenger, and insights each need their own permissions on top. Ayrshare's app already holds all of them, so your users approve one linking screen. See [how Ayrshare links your users' accounts](/business-plan-for-multiple-users/).
### Can you schedule Facebook posts with an API?

Yes, you can schedule Facebook posts with an API in two ways. Pass a scheduleDate in ISO 8601 UTC and Ayrshare publishes at that time, for any date. Or pass scheduledPublishDate, 10 minutes to 29 days out, to place the post in Meta Business Suite. The tutorial [How to Post to a Facebook Page with an API](/blog/facebook-api-how-to-post-and-get-analytics-using-the-facebook-api/) walks through both.
### Can I get Facebook Page analytics and comments through the same API?

Yes, you get Facebook Page analytics and comments through the same API and the same Page connection you post with. Post analytics cover reactions, comments, shares, and views. Page analytics need at least 100 likes and refresh about daily. The comments endpoint replies on any Page post, even ones not published through Ayrshare. See the [Analytics API](/social-media-analytics-api/).

## Your Users Are on Facebook. Your Product Can Be Too.

Get an API key, publish your first Facebook Page post, and turn on the other networks with the same call when you need them.

[Get Your API Key](/pricing/)
[Read the Facebook Docs](/docs/apis/post/social-networks/facebook)
