Facebook

The Facebook Pages API, simplified

Read and reply to comments, manage Messenger conversations, and publish posts to Facebook Pages without wrestling with Graph API versioning or token lifecycle. SocialAPI.ai gives you a clean REST interface over the full Facebook Pages feature set.

Free tier available
Instant API key
MCP server included

What you can do with Facebook.

Supported

Comments

Read, reply, hide, unhide, like, unlike, and delete comments on Page posts.

Supported

Direct Messages

List Messenger conversations, read messages, and send replies within the 24-hour messaging window.

Supported

Mentions

Retrieve posts where your Page is mentioned or tagged by other users.

Supported

Publishing

Publish text posts, photos, videos, and link shares to your Facebook Page.

Supported

Webhooks

Receive real-time events for feed changes, new messages, and mentions via Meta webhooks.

See it in action.

Reply to a Facebook comment

api.social-api.ai
1curl -X POST https://api.social-api.ai/v1/inbox/comments/<post-id> \
2  -H "Authorization: Bearer <your-api-key>" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "parent_id": "<parent-comment-id>",
6    "text": "Thanks for the feedback! We appreciate it."
7  }' | jq
8
9# Response
10{
11  "id": "<comment-id>",
12  "platform": "facebook",
13  "text": "Thanks for the feedback! We appreciate it.",
14  "created_at": "2026-03-20T15:10:00Z"
15}

Post a reply to any comment on your Page using the unified inbox endpoint. SocialAPI.ai resolves the correct Page access token automatically.

Why developers love Facebook on SocialAPI.ai

1

Full comment lifecycle

Read comments across all your Page posts with cursor-based pagination. Reply to individual comments, hide inappropriate ones from public view, like comments to acknowledge feedback, or delete them entirely. SocialAPI.ai normalizes the Graph API response into a consistent schema shared across all platforms.

2

Messenger integration

Access Facebook Messenger conversations through the unified DM inbox. List active conversations, read full message histories, and send text replies. SocialAPI.ai handles the Messenger Send API's messaging_type requirements and respects the 24-hour standard messaging window automatically.

3

Page publishing

Publish text posts, photo posts, video posts, and link shares to your Facebook Page. Upload media through presigned URLs and schedule posts for future publication. SocialAPI.ai manages the Graph API's media upload flow and returns a consistent post object with platform IDs for tracking.

4

Real-time webhook events

Get instant notifications for new comments, Messenger messages, and Page mentions. SocialAPI.ai verifies Meta webhook signatures, processes feed and messaging events, and delivers them to your configured webhook endpoints with retry logic and delivery tracking.

5

Long-lived token management

Facebook Page tokens derived from long-lived user tokens never expire. SocialAPI.ai exchanges short-lived tokens during OAuth, upgrades them to long-lived tokens, and stores the encrypted credentials. You never need to handle token refresh for Facebook Pages.

FAQ

Frequently asked questions.

Why can't I access Facebook Page reviews?

Meta deprecated the Page Reviews/Recommendations API in Graph API v22.0. This affects all third-party integrations, not just SocialAPI.ai. There is currently no API access to Facebook reviews or recommendations.

What permissions does the Facebook OAuth flow request?

SocialAPI.ai requests pages_show_list, pages_read_engagement, pages_read_user_content, pages_manage_engagement, pages_manage_metadata, pages_messaging, and public_profile. These scopes cover reading and replying to comments, managing Messenger conversations, and publishing posts.

Can I manage multiple Facebook Pages with one account?

Yes. When you connect a Facebook account via OAuth, SocialAPI.ai discovers all Pages you administer and creates a connected account for each one. You can then manage them independently using their respective account IDs.

How does the 24-hour Messenger window work?

Facebook only allows Page replies within 24 hours of the user's last message. If the window has expired, the API will return an error. This is a Meta platform policy enforced at the API level. SocialAPI.ai returns a clear error message when the window is closed.

Do Facebook Page tokens expire?

No. SocialAPI.ai exchanges your OAuth code for a long-lived user token and then retrieves Page tokens, which do not expire. You connect once and the credentials remain valid unless you change your Facebook password or revoke the app permissions.

Get started today

Ready to unify your social interactions?

Free tier available · No credit card required · Ships with MCP server