Skip to content

Facebook — Comments ​

Get comment — facebook.get_comment ​

Reads one comment by id: message, author, created time and like count. Pass fields to request more, e.g. attachment or parent.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyespages_read_engagement, pages_read_user_content

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
comment_idstringyesComment id. From facebook.get_comments.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,message,created_time".

Extra fields: ignored.

Output

FieldTypeDescription
idstring
messagestring
created_timestring
fromobject
like_countinteger

Get comments — facebook.get_comments ​

Lists comments on a post or on another comment (replies). filter is toplevel or stream; order is chronological or reverse_chronological. Supports paging.

Side effectRiskNeeds approvalIdempotentScopes
NONElownoyespages_read_engagement, pages_read_user_content

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
object_idstringyesPost or comment id. From facebook.get_page_posts or facebook.get_comments.
filterstringnotoplevel = top comments only (default); stream = all comments incl. replies. One of: toplevel, stream.
orderstringnoSort by time: chronological (oldest first) or reverse_chronological. One of: chronological, reverse_chronological.
fieldsstringnoComma-separated Graph fields to return, e.g. "id,message,created_time".
limitintegernoMax items per page (1-100). Min 1. Max 100.
afterstringnoCursor for the next page, from paging.cursors.after of the previous call.

Extra fields: ignored.

Output

FieldTypeDescription
dataarray of object
data[].idstring
data[].messagestring
data[].created_timestring
data[].fromobject
pagingobject
paging.cursorsobject

Create comment — facebook.create_comment ​

Comments (or replies) as the Page on a post or comment. Waits for human approval; once approved the comment is public. attachment_url adds an image.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesnopages_manage_engagement, pages_read_user_content

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
object_idstringyesPost or comment id. From facebook.get_page_posts or facebook.get_comments.
messagestringyesComment text.
attachment_urlstringnoPublic https URL of an image to attach.

Extra fields: ignored.

Output

FieldTypeDescription
idstring

Approval card: shown as message (page → page_id, recipient → object_id, text → message, media → attachment_url).

Update comment — facebook.update_comment ​

Edits a comment's message or hides/unhides it with is_hidden. Hiding keeps the comment but removes it from public view.

Side effectRiskNeeds approvalIdempotentScopes
WRITEmediumnonopages_manage_engagement, pages_read_user_content

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
comment_idstringyesComment id. From facebook.get_comments.
messagestringnoNew comment text. Leave empty to keep the text.
is_hiddenbooleannotrue hides the comment from the public, false unhides it.

Extra fields: ignored.

Output

FieldTypeDescription
successboolean

Approval card: shown as message (page → page_id, recipient → comment_id, text → message).

Delete comment — facebook.delete_comment ​

Deletes a comment from a post. Waits for human approval; once approved the comment is removed permanently. Consider update_comment with is_hidden instead.

Side effectRiskNeeds approvalIdempotentScopes
WRITEhighyesyespages_manage_engagement, pages_read_user_content

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
comment_idstringyesComment id. From facebook.get_comments.

Extra fields: ignored.

Output

FieldTypeDescription
successboolean

Like post or comment — facebook.like_post_or_comment ​

Likes a post or comment as the Page. Safe to repeat; liking twice has no extra effect.

Side effectRiskNeeds approvalIdempotentScopes
WRITElownoyespages_manage_engagement, pages_read_user_content

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
object_idstringyesPost or comment id. From facebook.get_page_posts or facebook.get_comments.

Extra fields: ignored.

Output

FieldTypeDescription
successboolean

Unlike post or comment — facebook.unlike_post_or_comment ​

Removes the Page's like from a post or comment. Safe to repeat; no effect if not liked.

Side effectRiskNeeds approvalIdempotentScopes
WRITElownoyespages_manage_engagement, pages_read_user_content

Input

FieldTypeRequiredDescription
page_idstringyesPage id. From facebook.list_managed_pages.
object_idstringyesPost or comment id. From facebook.get_page_posts or facebook.get_comments.

Extra fields: ignored.

Output

FieldTypeDescription
successboolean