开发者

Facebook Like button - fetches "wrong" image [duplicate]

开发者 https://www.devze.com 2023-03-03 02:02 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How does Facebook Sharer select Images?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How does Facebook Sharer select Images?

I'm using the following code to add a Facebook like button to my site:

<iframe src="http://www.facebook.com/plugins/like.php?href=XXXXXXXX&amp;send=false&amp;layout=button_count&amp;width=50&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="bor开发者_开发知识库der:none; overflow:hidden; width:50px; height:21px;" allowTransparency="true"></iframe>

When I later look at my wall I can see the post that I've just liked. But it shows a gui-widget (from the sites grafik) not any other "valid" images. Is it possible to specify which image to show?


You'll want to use open graph tags (namely <og:image>) to specify what image you want to show.

Additionally, you can use the URL Linter to debug what you're sending Facebook. You may have some issues with the linter as it says it decaches when you lint a URL, but in practice it doesn't always work that way.


You can provide metadata at the page you're liking that will populate the image.

Check this out: Want custom title / image / description in facebook share link from a flash app

In the example provided the page returns metadata that allows Facebook to set the description, caption, and image for the object (your page) being liked.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号