Facebook

Post to Facebook pages and profiles via the PostPeer API.

Overview

Publish text, images, videos, and links to Facebook pages and profiles. PostPeer handles the Graph API complexity and OAuth.

Status: Coming soon. Facebook integration is currently in development.

Quick Start

1. Connect a Facebook Account

curl https://api.postpeer.dev/v1/connect/facebook \
  -H "x-access-key: YOUR_API_KEY"

Returns a Facebook OAuth URL. The user authorizes page or profile posting permissions.

2. Publish a Post

curl -X POST "https://api.postpeer.dev/v1/posts" \
  -H "x-access-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Exciting news from our team! We just hit 10k users.",
    "platforms": [
      { "platform": "facebook", "accountId": "fb_789" }
    ],
    "publishNow": true
  }'

Response:

{
  "success": true,
  "status": "published",
  "postId": "post_mno345",
  "platforms": [
    {
      "platform": "facebook",
      "success": true,
      "platformPostUrl": "https://www.facebook.com/post/987654321"
    }
  ]
}

Features

Text Posts

Publish text-only posts to pages or profiles.

Image & Video Posts

Attach media using the mediaItems array:

{
  "mediaItems": [
    { "type": "image", "url": "https://cdn.example.com/photo.jpg" }
  ]
}

Include a URL in your post content and Facebook automatically generates an Open Graph preview.

Media Requirements

TypeFormats
ImageJPG, PNG, GIF
VideoMP4, MOV

On this page