Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Like social plugin displays zero likes for any Facebook photo

Problem: when Facebook Like plugin (the like button) is used to allow people to like my facebook posts through my website, it does not display proper number of likes for Photos in my feed. It works only for Status updates.

Additional information

All goes well, providing the URL to like from the actual post (eg. http://www.facebook.com/xxxxxxxxx/posts/yyyyyyyyy). It displays the like button along with the number of likes that post currently has and allows me to like it. If I'm not logged in to facebook, I'm given a prompt to log in as expected.

However, once that post is of type "photo" (as seen in the graph api) and as such contains a photo, the above method does not work. Even tho the direct link to the post page shows that it has likes, the like button still shows 0 likes, and clicking the like button increases that 0 to 1, but does not increase the like count on that post/photo. It's as if facebook does not connect likes to a post when it contains a photo.

My question is... is it possible to find the proper URL to add to the facebook button in order for it to fetch the right likes from the photo/post (just like it would if there's only a post), and if so, how would I go about finding that URL?

Way to reproduce

here is the JSFiddle link which clearly illustrates the problem: http://jsfiddle.net/HALtb/

Looking for a solution.

Thank you.

like image 561
user1768502 Avatar asked Nov 12 '22 19:11

user1768502


1 Answers

The Facebook Like Button social plugin is for liking articles or Open Graph objects by URL It does not work with content on facebook.com with the exception of Facebook Pages. It can't be used to like photos, comments, posts, etc. Those can be liked directly via the API with the appropriate permissions from your app's user

like image 141
Igy Avatar answered Nov 15 '22 13:11

Igy