Facebook Like按钮 - 抓取“错误”图片 [英] Facebook Like button - fetches "wrong" image

查看:118
本文介绍了Facebook Like按钮 - 抓取“错误”图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Facebook Sharer如何选择图像?

I使用以下代码将Facebook添加到我的网站上:

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="border:none; overflow:hidden; width:50px; height:21px;" allowTransparency="true"></iframe>

当我后来看着我的墙,我可以看到我刚刚喜欢的帖子。但它显示一个gui小部件(从网站grafik)没有任何其他有效的图像。可以指定要显示哪个图像?

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?

推荐答案

您将要使用开放图表标签(即< og:image> )来指定什么想要显示的图像

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

此外,您可以使用 URL Linter 调试您发送的Facebook。您可能会遇到一些与linter有关的问题,因为 它会在您拖曳URL时将其拆除,但实际上并不总是以这种方式工作。

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.

这篇关于Facebook Like按钮 - 抓取“错误”图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆