I am looking at the Facebook Graph API docs, specifically for
/{post-id}/comments
/{post-id}/reacts
/{post-id}/likes
I am trying to figure out if I can determine which user commented/reacted/liked a post that I posted on my wall/feed.
According to these docs, I can’t figure out if this is possible? does anyone know?
https://developers.facebook.com/docs/graph-api/reference/v3.2/object/comments
https://developers.facebook.com/docs/graph-api/reference/v3.2/object/likes
https://developers.facebook.com/docs/graph-api/reference/v3.2/object/reactions
if it’s not clear…all I really want to do here is get the user-id of the user that liked/commented on/shared/reacted to, a post that I posted (I being the logged in user to the graph api).
2
Answers
I tested this just be sure: There is no way to get a user id if the user in question did not authorize your App. So, the
reactions
andlikes
endpoint would just return an empty array, and thecomments
endpoint would just return data that is not specific for that user.For example, the response for
reactions
of a Page Post that definitely has reactions and is public without any restrictions – the App being used even got “Page Public Content Access” approved:I used to ask similar questions when trying to get information such as user id or user name of commenters on my fanpage using Graph API. To be able to obtain such information, your application needs to review Facebook’s related rights. In my case I asked to review the following permissions: pages_read_engagement, pages_manage_metadata, pages_read_user_content and after being approved, you will get the information of the commenter