
Developer guide
Facebook Post API: Publish, Edit and Read Posts from Your App
Publish, edit, delete and read Facebook posts by API in 2026, through Meta's Pages API or your users' own connected accounts.
Post as
Northwind Bakery
Anna Lee
Fresh sourdough every morning from 7am. Pre-orders open on Friday.
Publish
Our autumn menu starts MondayNorthwind Bakery · Page · TodayPublished
Thanks for 10 great years!Northwind Bakery · Page · Oct 2Edited
Back from the farmers marketAnna Lee · Personal · Sep 28In trash
POST
posts
PATCHposts/{id}
DELETEposts/{id}
200 OK
Table of Contents
Meta's API
Connected accounts
Reading and choosing
Short answer
A Facebook post API lets your app publish, edit, delete and read Facebook posts with HTTP requests. There are two routes: Meta's Pages API, which only publishes to Facebook Pages through a Meta app and Page access tokens, or a connected account, where each user links their own Facebook account and your app posts as their profile or as a Page they manage.
For the wider picture of Meta's platform, see how the Facebook APIs fit together.
With Unipile
Publish a Facebook post in three steps
Connect the accountYour user links their Facebook account, and the Pages they manage, through Hosted Auth. No Meta app, no App Review.
Create the postSend
POST /v2/{account_id}/postswith your key inX-API-KEYand a text or attachments.Edit, delete or post as a PageCall
PATCHorDELETEon the post, or addpost_aswith an activated Page ID.
Definition
What Is the Facebook Post API?
Meta has no product called "Post API". Facebook posts are objects of the Graph API, and apps publish them through the Pages API, which only writes to Facebook Pages. Since 2018, a third party app can no longer publish to a person's own profile.
In practice, "Facebook post API", or what developers call the Facebook API for posts, means Graph API calls on a post node and on a Page's /feed edge. Nodes, edges and tokens: see our Facebook Graph API overview.
{page_id}_{post_id}The post node. Its ID joins the author ID and the post ID./{page_id}/feedThe edge that lists a Page's posts and receives new ones.messageThe text of the post.created_timeWhen the post was published./{page_id}/photosThe edge for photo posts.
Meta Pages API
How Do You Publish a Post to a Facebook Page with the Graph API?
Send POST /{page_id}/feed with a message (and optionally a link), using a Page access token (see the Facebook Page API guide and our Facebook API access token guide). Meta returns the new post ID as {"id": "{page_post_id}"}.
1
Meta app
Create an app and add Facebook Login for Business.
pages_show_list2
Permissions
Request posting rights, then pass App Review.
pages_manage_posts3
Page token
Get the Page token from the user token.
GET /me/accounts4
Publish
Post to the Page feed with the Page token.
POST /{page_id}/feedPermissions and Page tasks
- To publish. The Page feed reference asks for
pages_manage_posts,pages_read_engagementandpages_show_list, from someone who can perform theCREATE_CONTENTtask on the Page. - To manage posts and their engagement. The Pages API posts guide adds
pages_manage_engagementandpages_read_user_engagement, with theCREATE_CONTENT,MANAGEandMODERATEtasks. - For video. Add
publish_video.
The request and its response are in the Meta cURL and Meta Python tabs of the code block below, next to the Unipile version.
Parameters of a Page post
| Parameter | What it does |
|---|---|
message | The text of the post |
link | A URL shown with a link preview |
published | false for an unpublished or scheduled post |
scheduled_publish_time | Publish date, 10 minutes to 30 days ahead |
message
The text of the post
link
A URL shown with a link preview
published
false for an unpublished or scheduled postscheduled_publish_time
Publish date, 10 minutes to 30 days ahead
Photos and video. A single photo goes to /{page_id}/photos. For a multi-photo post, upload each photo to that edge with published=false, then publish them together on /{page_id}/feed with attached_media and the returned IDs; unpublished photos are deleted after 24 hours. Videos go through the Video API with publish_video.
Source: Meta's Pages API posts documentation, Pages API getting started, the Page feed reference and the Page photos reference (Graph API v27.0). Last verified: November 17, 2026.
Post rules
What Meta's API Does Not Let You Do with Posts
Three rules of the Graph API shape any Facebook posting project: apps cannot publish to personal profiles, cannot publish to Groups, and can only update the Page posts they created themselves.
Since 2018
No posts to personal profiles
Meta removed the publish_actions permission from apps on August 1, 2018. Details in the limits of the official Facebook API.
Since 2024
No posts to Groups
The Groups API and publish_to_groups were deprecated with Graph API v19.0 on January 23, 2024.
Often missed
Edits only on your own app's posts
"An app can only update a Page post if the post was made using that app."
Your app cannot update a post written on facebook.com or by another tool, so a product that edits posts must create them.
Errors you will meet first. With the Graph API, code 190 means the access token expired, codes 200 to 299 mean a permission was not granted or was removed, and 4 or 17 mean too many calls. With Unipile, posting as a Page that is not activated returns 403 api/insufficient_permissions.
Sources: Meta's Pages API posts documentation, Facebook Login changelog, Graph API v19.0 announcement and Graph API error handling. Last verified: November 17, 2026.
With Unipile
Publish, Edit and Delete Posts from a Connected Account
With Unipile, each user connects their Facebook account through Hosted Auth, and your app gets an account_id. You create a post with POST /v2/{account_id}/posts, change its text with PATCH and remove it with DELETE. A deleted post goes to the trash, where its author can still read it for 30 days.
No Meta app or App Review on your side: each call sends your API key in X-API-KEY and runs on behalf of the user who connected the account. The Meta tabs show the same publish with the Graph API and a Page access token, for comparison.
const BASE = "https://api.unipile.com/v2";
const headers = {
"X-API-KEY": process.env.UNIPILE_API_KEY,
"content-type": "application/json"
};
// 1. Publish a text post from the connected account
await fetch(`${BASE}/${ACCOUNT_ID}/posts`, {
method: "POST", headers,
body: JSON.stringify({ text: "Our autumn menu starts Monday." })
});
// 2. Edit its text later (media and audience are kept)
await fetch(`${BASE}/${ACCOUNT_ID}/posts/${POST_ID}`, {
method: "PATCH", headers,
body: JSON.stringify({ text: "Our autumn menu starts Monday at 7am." })
});
import os, requests
BASE = "https://api.unipile.com/v2"
headers = {"X-API-KEY": os.environ["UNIPILE_API_KEY"]}
# 1. Publish a text post from the connected account
requests.post(f"{BASE}/{ACCOUNT_ID}/posts", headers=headers,
json={"text": "Our autumn menu starts Monday."})
# 2. Edit its text later (media and audience are kept)
requests.patch(f"{BASE}/{ACCOUNT_ID}/posts/{POST_ID}", headers=headers,
json={"text": "Our autumn menu starts Monday at 7am."})
# 1. Publish a text post from the connected account
curl --request POST \
--url "https://api.unipile.com/v2/{ACCOUNT_ID}/posts" \
--header "X-API-KEY: {YOUR_API_KEY}" \
--header "content-type: application/json" \
--data '{ "text": "Our autumn menu starts Monday." }'
# 2. Edit its text later (media and audience are kept)
curl --request PATCH \
--url "https://api.unipile.com/v2/{ACCOUNT_ID}/posts/{POST_ID}" \
--header "X-API-KEY: {YOUR_API_KEY}" \
--header "content-type: application/json" \
--data '{ "text": "Our autumn menu starts Monday at 7am." }'
# Meta Graph API: publish to a Page with a Page access token
curl -X POST "https://graph.facebook.com/v27.0/{PAGE_ID}/feed" \
-H "Content-Type: application/json" \
-d '{
"message": "Our autumn menu starts Monday.",
"link": "https://example.com/menu",
"access_token": "{PAGE_ACCESS_TOKEN}"
}'
# Response: the ID of the new Page post
{ "id": "{PAGE_POST_ID}" }
# Read that post back with the fields you need
curl -G "https://graph.facebook.com/v27.0/{PAGE_POST_ID}" \
-d "fields=id,message,created_time,permalink_url" \
-d "access_token={PAGE_ACCESS_TOKEN}"
import os, requests
GRAPH = "https://graph.facebook.com/v27.0"
TOKEN = os.environ["PAGE_ACCESS_TOKEN"]
# Meta Graph API: publish to a Page
r = requests.post(f"{GRAPH}/{PAGE_ID}/feed", data={
"message": "Our autumn menu starts Monday.",
"link": "https://example.com/menu",
"access_token": TOKEN,
})
post_id = r.json()["id"] # {"id": "{PAGE_POST_ID}"}
# Read that post back with the fields you need
post = requests.get(f"{GRAPH}/{post_id}", params={
"fields": "id,message,created_time,permalink_url",
"access_token": TOKEN,
}).json()
Request fields in Create posts, editing and the trash in Edit and delete posts. The Meta tabs follow the Pages API posts guide and the Post reference, v27.0, verified Nov. 17, 2026.
Content rules for a Facebook post
| Field or case | Rule |
|---|---|
text and attachments | Text or attachment required. Files in base64, or multipart for large files |
| Images | Several images form an album |
| Video | One video per post, never mixed with images |
quoted_post_id | Shares a post, without attachments |
| Mentions | @ plus an ID or vanity name in text |
can_read | anyone (default) or relations_only |
can_comment | Only anyone, otherwise 400 |
text and attachments
Text or attachment required. Files in base64, or multipart for large files
Images
Several images form an album
Video
One video per post, never mixed with images
quoted_post_id
Shares a post, without attachments
Mentions
@ plus an ID or vanity name in textcan_read
anyone (default) or relations_onlycan_comment
Only
anyone, otherwise 400
Compliance
Your users post from their own accounts
Unipile is not a Meta product or a Meta Partner. Your users connect their own accounts, decide what gets published, and remain bound by Meta's terms.
Facebook Pages
How Do You Post as a Facebook Page from a Connected Account?
Add post_as with the ID of a Page that the account administers and that is activated on the account. There is no separate account to connect: the same account_id covers the user's profile and their Pages.
- Find the Page ID. Each activated Page has an inbox named
PAGE_<page_id>_INBOX. - Activate the Page first. Posting as a Page that is not activated returns
403 api/insufficient_permissions. - Edits follow the author. A post written by an activated Page is edited or deleted as that Page, with no extra field.
Setup steps in the Facebook Pages documentation.
Anna LeeNo post_as: posts as the profileProfile
Northwind Bakerypost_as: "1357020157484056"Activated
Harbor CafePage not activated403
POST /v2/{account_id}/posts
{
"text": "Hello from our Page!",
"post_as": "1357020157484056"
}
Read posts
How Do You Get Posts from a Facebook Profile or Page?
With Meta's API, call GET /{page_id}/feed with a Page access token. With Unipile, call GET /v2/, where user_id is me, the ID of an activated Page, or the ID of another person or Page whose posts the connected account can already see on Facebook.
Typical use: recent activity in a CRM or social tool, for accounts your users connected. Reading someone else's posts stays within what the connected account already sees on Facebook, and happens when the user asks for it.
Excited to join the Lisbon team next month!
Slides from my talk on support tooling are up.
Weekend hike with the team.
Next page
next_cursor: "QVFIUm..."
GET
v2/{ACCOUNT_ID}/users/{USER_ID}/posts
200 OK
Unipile
With Unipile
- List posts
- GET
/v2/{account_id}/ users/ {user_id}/ posts - user_id
me, the ID of an activated Page, or the ID of another person or Page, limited to posts the connected account can already see- One post
- GET
/v2/{account_id}/ posts/ {post_id} - Post ID
<author id>_<post id>- Reactions and comments
- List, add and remove reactions on a post, and work with its comments (see the Facebook comments API), through the same
account_id
Pagination is set by Facebook
Facebook returns up to 3 posts per page, whatever limit you send. Follow next_cursor to get the next page; there is no offset. Details in List user posts.
Decision
Pages API or Connected Accounts: Which One Fits Your Product?
Meta's Pages API fits an app that publishes to its own company Pages, or to client Pages that go through your Meta app. A connected account fits a SaaS product where each user publishes from their own profile and Pages, without a Meta app on your side.
| Criteria | Meta Pages API | Connected account (Unipile) |
|---|---|---|
| Accounts covered | Pages your app's users manage | The user's profile and the Pages they manage |
| Setup on your side | Meta app, Facebook Login, App Review | API key and Hosted Auth, no App Review |
| Credentials | One Page token per Page | One account_id per user |
| Personal profile posts | Not available since 2018 | Yes, as the connected user |
| Editing posts | Only posts made with your app | Text of a post, by post_id |
| Groups | Deprecated in v19.0 | Not supported |
| Stories | Outside this guide | Not supported |
| Scheduling | scheduled_publish_time, 10 minutes to 30 days | Not documented, use your own job queue |
| Other networks | Facebook Pages only | Same API for LinkedIn, Instagram, WhatsApp and more |
Accounts covered
Meta Pages APIPages your app's users manage
Connected accountThe user's profile and the Pages they manage
Setup on your side
Meta Pages APIMeta app, Facebook Login, App Review
Connected accountAPI key and Hosted Auth, no App Review
Credentials
Meta Pages APIOne Page token per Page
Connected accountOne
account_id per userPersonal profile posts
Meta Pages APINot available since 2018
Connected accountYes, as the connected user
Editing posts
Meta Pages APIOnly posts made with your app
Connected accountText of a post, by
post_idGroups
Meta Pages APIDeprecated in v19.0
Connected accountNot supported
Stories
Meta Pages APIOutside this guide
Connected accountNot supported
Scheduling
Meta Pages API
scheduled_publish_time, 10 minutes to 30 daysConnected accountNot documented, use your own job queue
Other networks
Meta Pages APIFacebook Pages only
Connected accountSame API for LinkedIn, Instagram, WhatsApp and more
The same connection covers conversations: see Unipile's Facebook and Messenger API, how to connect a personal Facebook account, and Facebook Messenger API pricing.
Use cases
Use Cases: Posts Inside CRMs, Social Tools and AI Agents
The Facebook post API pays off inside products where people already work, each user publishing from their own accounts.
Social inbox and community tools
Community managers publish and fix posts for their profile and Pages, next to their messages.
CRM activity
When the rep asks, a contact record shows the person's latest posts, limited to what the rep's connected account already sees on Facebook.
AI agents with approval
An agent drafts a post, the user approves it, and only then does your app send the POST.
The same posts model works for other networks: our Instagram API guide covers the other Meta network.
Start publishing Facebook posts from your app
Use Meta's Pages API for your own Pages. When each user publishes, edits and reads posts from their own profile and Pages, connect their accounts through Unipile: one REST API.
EU Regulated
Digital Markets Act (DMA)
Each user connects their own account, with no profile storage. Unipile is not a Meta Partner. Learn more
All Facebook API endpoints in one place
Posts are one part of the picture. See every Facebook endpoint available with Unipile, from messages to profiles, or read the complete Facebook API guide.
Facebook Post API FAQ
Quick answers on Pages, photos, scheduling, edits, Groups, video and reading posts.
With Meta's Pages API, send POST /{page_id}/feed with a message, using a Page access token and the pages_manage_posts, pages_read_engagement and pages_show_list permissions. With Unipile, the user connects their Facebook account once, and you call POST /v2/{account_id}/posts with post_as set to the ID of a Page they manage and activated.
With Unipile, several images in one post are displayed as an album, and a post can carry one video instead, never both. With Meta's Pages API, photos are published through the /{page_id}/photos edge.
Meta's Pages API can: create the post with published set to false and a scheduled_publish_time between 10 minutes and 30 days ahead, per the Pages API guide (the Page feed reference says 75 days; test on your version). Unipile does not document native scheduling, so keep the planned date in your own job queue and call POST /v2/{account_id}/posts when it is due.
Yes. With Meta's API, an app can only update the Page posts it created, and deletes a post with DELETE /{page_post_id}. With Unipile, PATCH /v2/{account_id}/posts/{post_id} changes the text, and DELETE moves the post to the trash, where its author can read it for 30 days.
No. Meta deprecated the Groups API and the publish_to_groups permission with Graph API v19.0 in January 2024, and Unipile does not support publishing to Groups either.
You can post a video. With Unipile, a post takes one video, Facebook processes it asynchronously. Reels are not documented and Stories are not supported.
With Meta's Graph API, call GET /{page_id}/feed with a Page access token and the pages_read_engagement and pages_read_user_content permissions; limit returns at most 100 posts per request. With Unipile, call GET /v2/{account_id}/users/{user_id}/posts with the ID of an activated Page, then follow next_cursor to get the next page.
No. Unipile is an independent company, not a Meta Partner, and it is not endorsed, sponsored or approved by Meta. The posts your app publishes come from your users' own Facebook accounts and Pages. Facebook is a trademark of Meta Platforms, Inc.
No. To publish or read posts through Unipile, your users connect their own Facebook account, and the Pages they manage, through hosted authentication. You skip the Meta app, the posting permissions and the App Review that the Pages API route requires.
Unipile is designed in the spirit of the Digital Markets Act: each user connects their own account and decides what gets posted, and Unipile acts on their behalf without storing user profiles. More on our Digital Markets Act page.
Yes. Every post your app publishes or reads goes through an account that remains bound by Meta's Terms of Service. Keep to legitimate uses, such as publishing your users' own content and showing posts their account already sees when they ask for it; spam and unauthorized automation can get accounts restricted.
Still have questions? Our team is here to help.
Talk to an expert
