pythonfacebookfacebook-page

Get comment on owned page


I owned a page on Facebook. My purpose is I want to collect all the comments, replies within my page which is made by user as well as the thread ID of the comment.

I have read the document of Facebook's Graph API and it describes:

Page owned Comments and Replies — For any comments or replies owned by (on) a Page, you must use a Page access token if you want User information to be included in the response

I am confused, I had the access token but the API endpoint looks like:

GET /v4.0/{comment-id} HTTP/1.1

Does that mean I have to specify a comment-id in order to get it? May you please help me. Thanks.


Solution

  • This would be the correct endpoint: GET /v4.0/{post-id}/comments HTTP/1.1

    (https://developers.facebook.com/docs/graph-api/reference/post/)

    Subcomments: GET /v4.0/{comment-id}/comments HTTP/1.1

    (Facebook graph API: get the "subcomments" in a tree of a discussion)