Facebook Page comment moderation API: read, reply, hide and delete comments
Through the Graph API, a Facebook Page can read the comments on its posts, reply as the Page in public, send one private reply per comment, hide a comment or show it again with is_hidden, and delete it. Reading returns top-level comments in chronological order by default, and moderation needs a token from someone with the MODERATE task on the Page.
easyCoexistence reads Facebook comments with list_social_comments, replies in public or privately with reply_to_comment, and hides or shows them with hide_comment, from Claude, ChatGPT or your own code.
The default comment filter: top-level comments in chronological order, as Facebook orders them.
The filter that returns comments at all levels in chronological order, which Meta suggests for moderation tools.
The Page task required to see comment IDs on a Page post and to comment as the Page.
Error code when a comment is made as a user rather than as the Page: There was an error posting to this wall.
How are comments read?
GET /{page-post-id}/comments returns a post's comments. The default filter is toplevel, top-level comments in chronological order as Facebook orders them; filter=stream returns comments at all levels in chronological order, which Meta suggests for moderation tools, and summary=true adds a total_count. The from field holds the commenter's Page-scoped ID. list_social_comments reads up to 50 top-level comments per call, each with its ID, text, author, time and number of replies.
How does the Page reply in public?
POST /{page-post-id}/comments with message comments on a post, and POST /{comment-id}/comments replies to a comment, with the Page as the author in both cases. reply_to_comment posts the public reply; with private set to true it sends the commenter one Messenger message instead, within 7 days of the comment. Nobody can comment on the posts of an unpublished Page, and commenting as a user rather than as the Page fails with error 1705.
How are comments hidden and shown again?
POST /{comment-id} with is_hidden set to true hides a comment, and false shows it again; Meta marks the field as applying to Page comments. hide_comment does both, hiding by default and showing the comment again with hide set to false. Automations can hide the comment that started them, any comment or one containing a keyword.
Can comments be deleted?
Yes, with DELETE /{comment-id}. Meta's MODERATE task covers deleting comments on Page posts, pages_read_user_content allows deleting comments people posted on the Page, and pages_manage_engagement allows deleting comments on Page posts. easyCoexistence's comment tools hide rather than delete; when a comment has to go, delete it on Facebook or in Meta Business Suite.
Which tasks and permissions does moderation need?
A token from someone who can perform the MODERATE task on the Page: Meta returns comment IDs on a Page post only to such tokens, and requires the task to comment as the Page. The permissions are pages_read_user_content to read what others wrote and pages_manage_engagement to comment, with pages_messaging and the MESSAGING task for private replies.
How do new comments arrive?
Through the Page's feed webhook, as they happen: a change with item comment and verb add, carrying the comment_id, the post_id, the author and the message. Meta recommends the webhook over reading the feed, to avoid rate limiting. easyCoexistence receives it, runs comment-to-DM rules and automations on it, and forwards it to your endpoint if you set one.
Common mistakes
- Expecting replies in the default list. The toplevel filter returns top-level comments only; read a comment's own comments edge, or use filter=stream, for the threads.
- Deleting a comment that hiding would handle. A deleted comment is gone, while a hidden one comes back with is_hidden set to false.
- Replying to the Page's own replies. They come back through the feed webhook like other comments, so skip those whose from.id is the Page's ID.
- Treating total_count as exact. Meta notes it can be higher than the number of comments returned, because of comment privacy or deletion.
Comment-to-DM rules and automations reply to comments around the clock, and automations can hide them too. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Why does commenting as the Page return error 1705?
The comment was made as a user rather than as the Page; Meta's message reads There was an error posting to this wall.
Why is total_count higher than the comments returned?
Meta notes that total_count can exceed the number of comments a read returns, because of comment privacy or deletion, so treat it as an upper figure rather than an exact count.
Can a Page reply to a reply under a comment?
Yes. Posting to a comment's comments edge replies to it, with the Page as the author.
Why are comment IDs missing from my results?
Meta returns comment IDs on a Page post only when the token comes from someone who can perform the MODERATE task on that Page.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on