Facebook Graph API get all likes from a post

You can run another query on the ID of the like object asking for details (i.e. /Likes?limit=99)


https://graph.facebook.com/v2.4/[post_id]?fields=shares,likes.summary(true),comments.summary(true)

Facebook (v2.4+ API) counts for the post (shares + likes + comments)

added: please note, that 'albums' + 'photos' objects doesn't have shares, response from API will show you error message, that there is no such a property available on this object type.


You could do this:

https://graph.facebook.com/'.$post_id.'/comments?limit=0 // for comments
https://graph.facebook.com/'.$post_id.'/likes?limit=0 // for likes

Using facebook graph API . Hope it helps.

=========== Update: Thanks to laviksu

FQL and Graph API limit=0 change Currently, we have a bug where limit=0 returns all results. After the migration period, specifying a limit of 0 in FQL or the Graph API will return zero results.