Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Like button: how it choose image to display

I've put "Like" button to my web site.

In general it works fine, the only problem is when user add some text and publish it in the profile his post contains image. And the image chosen is not something meaningful, it is one of the menu items that doesn't really makes any sense.

Could you please advise how to tip to the facebook the better image? I didn't see any information about that in their documentation (http://developers.facebook.com/docs/reference/plugins/like/), probably I've overlooked that?

Thank you.

P.S. Pretty similar question: is there any way to suggest for user text he wants to share (that will appear once user click "Like" button)?

like image 380
Budda Avatar asked May 16 '12 04:05

Budda


1 Answers

You can specify image by adding Open Graph tags to head section each page containing the "Like" button.

You can specify an image URL in og:image tag, and Facebook will use this image in the user's profile entry.

The same goes with og:title - this will be the title of the new entry on user's profile. og:site_name (will be displayed as grey text under title) etc.

See http://developers.facebook.com/docs/reference/plugins/like/ and http://developers.facebook.com/docs/opengraphprotocol/ for detailed description.

You can use the Open Graph tags for both versions of the "like" button - iframe and XFBML.

Once you add the tags to your pages you can use http://developers.facebook.com/tools/debug to check if they are OK.

like image 200
jacekll Avatar answered Sep 30 '22 18:09

jacekll