Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.social-api.ai/llms.txt

Use this file to discover all available pages before exploring further.

Available Managed connector - SocialAPI handles the Meta App and platform app review for you. No customer-side Meta for Developers registration required. See Platform credentials. Facebook Pages are fully supported. The connector uses the Meta Graph API for posts, comments, DMs (Messenger), and mentions.

At a glance

FieldValue
Platform slugfacebook
Auth typeOAuth 2.0 (Meta)
APIMeta Graph API
Best forPage-level engagement: post and reply on Facebook Pages.

Capabilities

FeatureSupportedNotes
List postsYesPage feed posts
CommentsYesScoped to a specific post
Reply to commentYes
Private replyYesSends a one-time DM to the commenter
Comment replies (thread)YesFetch the reply thread under a comment
Moderate comment (hide/unhide/delete)Yes
Toggle post commentsNoNot supported by Facebook Graph API
DMsYesVia Messenger (24-hour messaging window)
Send DMYesText and/or media attachment (attachment_url)
Send DM attachmentYesImage, video, audio, or file via attachment_url (type inferred from URL extension, max 25 MB)
Get DM thread by userYes
ReviewsNoDeprecated in Graph API v22.0
MentionsYesPosts where the Page is tagged
Create postYesText, photos, links
Delete postYes

Connecting

curl -X POST https://api.social-api.ai/v1/accounts/connect \
  -H "Authorization: Bearer $SOCAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "facebook",
    "redirect_uri": "https://app.example.com/oauth/callback",
    "state": "session_abc123"
  }'
Response:
{
  "auth_url": "https://www.facebook.com/v25.0/dialog/oauth?client_id=...&state=...",
  "state": "4a8f2c1e9b3d7f06a5c2e8b4d1f3a7e2"
}
Redirect your user to auth_url. After they authorize, SocialAPI exchanges the code with Facebook and redirects the user to your redirect_uri with the connection result. See OAuth flows for the redirect parameters.

Reading samples

List posts

curl "https://api.social-api.ai/v1/accounts/{id}/posts?limit=10" \
  -H "Authorization: Bearer $SOCAPI_KEY"
Sample response:
{
  "data": [
    {
      "id": "123456789_987654321",
      "platform": "facebook",
      "caption": "Check out our new product!",
      "media_type": "status",
      "permalink": "https://www.facebook.com/123456789/posts/987654321",
      "timestamp": "2026-03-01T12:00:00Z",
      "like_count": 0,
      "comments_count": 0,
      "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
    }
  ],
  "count": 1
}

List comments on a post

curl "https://api.social-api.ai/v1/accounts/{id}/posts/123456789_987654321/comments?limit=10" \
  -H "Authorization: Bearer $SOCAPI_KEY"
Sample response:
{
  "data": [
    {
      "id": "sapi_cmt_...",
      "platform": "facebook",
      "type": "comment",
      "author": {
        "id": "111222333",
        "name": "Jane Smith"
      },
      "content": {
        "text": "Great post!"
      },
      "metadata": {
        "post_id": "123456789_987654321",
        "hidden": false,
        "like_count": 2,
        "has_replies": true
      },
      "created_at": "2026-03-01T13:00:00Z",
      "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
      "platform_id": "987654321_111222333"
    }
  ],
  "count": 1
}

List DMs

curl "https://api.social-api.ai/v1/accounts/{id}/dms?limit=10" \
  -H "Authorization: Bearer $SOCAPI_KEY"

Publishing

Create a Facebook Page post with optional platform-specific fields:
curl -X POST https://api.social-api.ai/v1/posts \
  -H "Authorization: Bearer $SOCAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Check out our new product!",
    "targets": [
      {
        "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
        "platform_data": {
          "link": "https://example.com/product"
        }
      }
    ]
  }'
For the full field reference, media constraints, and error recovery, see Facebook posts.

Limitations and gotchas

  • Multi-Page OAuth: a single OAuth flow connects all Facebook Pages the user manages. Each Page gets its own account_id.
  • Page tokens never expire: unlike Instagram, Facebook Page tokens derived from long-lived user tokens do not expire. No reconnection needed unless the user revokes access.
  • Private replies: replying to a comment with "private": true sends a one-time DM to the commenter. Can only be sent once per comment, within 7 days of the comment.
  • 24-hour messaging window: Pages can send any message within 24 hours of the user’s last message. After that, only approved message tags are allowed. If you get an error sending a DM, the window may have closed.
  • Reviews deprecated: Facebook deprecated Page Recommendations/Reviews in Graph API v22.0 (March 2025). The API returns 501 for review endpoints.

Permissions

SocialAPI’s managed Meta App already requests these scopes on your behalf: pages_show_list, pages_read_engagement, pages_read_user_content, pages_manage_engagement, pages_manage_metadata, pages_messaging, pages_manage_posts, public_profile, business_management. You don’t need to apply for any platform app review. See Platform credentials.