Using PHP, i can retrieve the images from a facebook page using a URL like this:
https://graph.facebook.com/v2.7/albumid/photos?access_token=XXXXXXX&debug=all&fields=images&format=json&method=get&pretty=1&suppress_http_code=1
But how can i get the likes count for each photos ? The URL above only returns image url, width and height. I’m looking for the number of likes for each page photos (not user photos)
2
Answers
From you API you will get photo ID of each photo you have to use that Photo ID .
TRY this ,
OR
For more information check this link
By requesting the relevant field, same as you are already doing with
images
:That will give you the individual likes. Since you are not interested in those, but only the total count, add summary=1 and a limit of 0, which using field expansion syntax would look like this: