Search code examples
facebookfacebook-graph-apifacebook-like

How to get like/share/comment data off of Facebook


I need to write a program for retrieving like/share/comment information from different groups I am the admin of on Facebook and tally up how many likes.shares/comments on each person does on the page to determine who is participating the most on different groups. But I have not done anything like this before so I was hoping to get some suggestions on how to do this. I would like to do it in Python or C++ if possible since I am familiar with those languages. But I am open to using PHP as well. Thanks in advance for any good suggestions.


Solution

  • This should get you started: https://developers.facebook.com/docs/groups-api/common-uses#getting-group-posts

    For comments, shares and likes you would need to request the respective fields/endpoints by adding the fields parameter to your call. However you cannot retrieve user data unless your app had been reviewed and approved. So for testing purposes you can only test this with your own posts/shares/comments/likes.