Networks
Facebook Pages
Publish to a Facebook Page feed — text-only or with an image.
Connect
OAuth with a Page picker: one Facebook login exposes every Page you administer, and you connect each as its own Herald account.
curl -X POST https://api.herald.leiritech.com/v1/accounts/connect \
-H "Authorization: Bearer hld_…" -H "Content-Type: application/json" \
-d '{"network":"facebook","redirect_url":"https://your-app.example/connected"}'
Open the returned connect_url; after authorizing, Herald shows a picker of your Pages
(name + avatar). Pick one or more — each becomes its own account UUID, no re-login.
Prerequisites (owner): Meta app with pages_show_list, pages_read_engagement,
pages_manage_posts, business_management; App ID/Secret in admin → Platform apps;
redirect https://herald.leiritech.com/api/oauth/facebook/callback registered.
Publish
# text-only
curl -X POST https://api.herald.leiritech.com/v1/posts \
-H "Authorization: Bearer hld_…" -H "Content-Type: application/json" \
-d '{"targets":["<page-uuid>"],"text":"Hello from Herald","mode":"now"}'
{ "id":"…","status":"published","targets":[{"network":"facebook","status":"published",
"permalink":"https://www.facebook.com/1017…_999","platform_post_id":"1017…_999"}] }
With an image (media_ids), Herald posts a photo (/{page}/photos); text-only posts to
the feed (/{page}/feed).
Rules & gotchas
- Media optional. 1 image → photo post; no image → text feed post.
- Followers + post reactions/comments/shares are collected as stats.
- Unpublish is supported —
POST /v1/posts/{id}/unpublishdeletes the live Page post. - If you administer many Pages, connect them individually from the picker; each is a separate account you can target.