Search code examples
facebookfacebook-graph-apifacebook-php-sdkfacebook-social-plugins

Get FB likes, shares and comments for a URL using PHP - with no limit


How can I simple get count of likes, shares and comments from a URL using PHP?

The method using FQL or graph.facebook.com didnt work anymore.

I need also about 1000 requests per day, I need solution with request limit more then 1000.


Solution

  • I think that FQL became deceprated by the beginning of August. I've solved this problem using graph API and stating the fields argument

    fields=likes.limit(0).summary(true),comments.limit(0).summary(true)

    the fields likes and comments would give you a list of people who liked or commented on it, the .limit(0) means that you don't need any exact names mentioned and .summary(true) gives you more detailed info on it - the number of likes/comments.

    I hope this explanation helps, you can find more info here https://developers.facebook.com/tools/explorer