Facebook Publishing

Learn how to connect Facebook Pages and publish various types of content to Facebook.

Connecting Facebook Pages

Prerequisites

Connection Steps

  1. Click the "Connect Facebook Page" button on the dashboard
  2. Log in to Facebook (if not already logged in)
  3. Select the Pages you want to connect to Boring
  4. Review and grant the required permissions:
    • pages_show_list - View your pages
    • pages_read_engagement - Read engagement data
    • pages_manage_posts - Publish and manage posts
    • pages_read_user_content - Read page content
  5. Click "Done" to complete the authorization

Your Facebook Pages will now appear in the Authorized Accounts list with:

Token Information

Supported Content Types

Facebook supports the following post types through Boring:

Type Description Media Count Example
Text Text-only post 0 Status updates, announcements
Photo Single image post 1 Product photo, event poster
Album Multiple images 2-10 Photo gallery, step-by-step guide
Video Video post 1 Tutorial, product demo

Publishing Examples

1. Text-Only Post

{
  "post": {
    "accountId": "your-facebook-page-account-id",
    "content": {
      "text": "Hello from Boring API! This is a text-only post.",
      "mediaUrls": [],
      "platform": "facebook"
    },
    "target": {
      "targetType": "facebook"
    }
  }
}

Result: A simple text post on your Facebook Page.

2. Single Photo Post

{
  "post": {
    "accountId": "your-facebook-page-account-id",
    "content": {
      "text": "Check out this amazing photo!",
      "mediaUrls": ["https://example.com/image.jpg"],
      "platform": "facebook"
    },
    "target": {
      "targetType": "facebook"
    }
  }
}

Result: A post with one image and caption.

Media Requirements:

3. Photo Album (Multi-Image)

{
  "post": {
    "accountId": "your-facebook-page-account-id",
    "content": {
      "text": "Here's a collection of our best moments!",
      "mediaUrls": [
        "https://example.com/photo1.jpg",
        "https://example.com/photo2.jpg",
        "https://example.com/photo3.jpg",
        "https://example.com/photo4.jpg"
      ],
      "platform": "facebook"
    },
    "target": {
      "targetType": "facebook"
    }
  }
}

Result: A photo album post with multiple images.

Album Requirements:

4. Video Post

{
  "post": {
    "accountId": "your-facebook-page-account-id",
    "content": {
      "text": "Watch this incredible video!",
      "mediaUrls": ["https://example.com/video.mp4"],
      "platform": "facebook"
    },
    "target": {
      "targetType": "facebook"
    }
  }
}

Result: A video post with description.

Video Requirements:

API Request Format

Full Example

import requests

API_URL = "https://boring.aiagent-me.com/v2/posts"
API_KEY = "boring_xxxxxxxxxxxxx"
ACCOUNT_ID = "your-facebook-page-account-id"

# Photo album example
post_data = {
    "post": {
        "accountId": ACCOUNT_ID,
        "content": {
            "text": "Summer collection 2025! 🌞",
            "mediaUrls": [
                "https://storage.example.com/summer1.jpg",
                "https://storage.example.com/summer2.jpg",
                "https://storage.example.com/summer3.jpg"
            ],
            "platform": "facebook"
        },
        "target": {
            "targetType": "facebook"
        }
    }
}

headers = {
    "boring-api-key": API_KEY,
    "Content-Type": "application/json"
}

response = requests.post(API_URL, headers=headers, json=post_data)
print(response.json())

Success Response

{
  "success": true,
  "message": "Post published successfully",
  "data": {
    "post_id": "123456789_987654321",
    "post_type": "album",
    "platform": "facebook",
    "page_name": "My Awesome Page",
    "photo_count": 3,
    "published_at": "2025-01-20T10:30:00Z"
  }
}

Media URL Requirements

Hosting Your Media

Media URLs must be:

Recommended Hosting Services

Testing Media URLs

Test your URLs with cURL before publishing:

curl -I https://example.com/image.jpg

Should return:

HTTP/2 200
content-type: image/jpeg
content-length: 123456

Troubleshooting

Common Errors

Error: "Invalid account_id"

Error: "Failed to download media"

Error: "Invalid media type"

Error: "Token expired"

Best Practices

  1. Test with text posts first - Ensure basic setup works
  2. Use reliable media hosting - Avoid temporary URLs
  3. Validate media URLs - Test accessibility before publishing
  4. Keep captions concise - Facebook recommends 1-2 paragraphs
  5. Use high-quality images - Min 1200x630 for best results
  6. Monitor publish history - Check dashboard for errors

Publishing History

View all your Facebook posts in the dashboard:

  1. Sign in to Boring Dashboard
  2. Scroll to "Recent Posts" section
  3. Filter by platform if needed

Each entry shows:

Rate Limits

Facebook API rate limits apply:

Boring handles rate limiting gracefully and returns appropriate errors if limits are reached.

Advanced Features

Multiple Pages

You can connect multiple Facebook Pages to the same Boring account. Each page gets a unique Account ID.

Example workflow:

  1. Connect Page A (get Account ID: aaa-111)
  2. Connect Page B (get Account ID: bbb-222)
  3. Publish to Page A using accountId: "aaa-111"
  4. Publish to Page B using accountId: "bbb-222"

Cross-Platform Publishing

Publish the same content to Facebook, Instagram, and Threads simultaneously:

accounts = [
    "facebook-page-account-id",
    "instagram-account-id",
    "threads-account-id"
]

for account_id in accounts:
    # Adjust content for each platform
    post_data = create_post_data(account_id, platform)
    response = requests.post(API_URL, headers=headers, json=post_data)

Next Steps