user3348281
user3348281

Reputation: 1

facebook likes count of images to my website

I have a Facebook gallery with images (User Album). I want to show the likes counts of every image on my (wordpress) website. For example, in a wp post content: " My first image is liked 400 times, while my second image is liked 560 times."

Is this possible with facebook Graph Api? Some one can help me how to do this?

Upvotes: 0

Views: 104

Answers (2)

andyrandy
andyrandy

Reputation: 74014

This would be the correct endpoint: https://developers.facebook.com/docs/graph-api/reference/v2.2/object/likes

The same permissions required to view the parent object are required to view likes on that object.

Meaning, if it´s on a Facebook Page you may just be able to use an App Token (if it´s not restricted by age or location) or an Extended Page Token that is valid forever. If it´s a User Album, you would need to authorize with user_photos and an Extended User Token is only valid for 60 days - so you would have to refresh the Token once in a while.

More information about Tokens:

Upvotes: 1

Related Questions