Facebook sharer.php,如何有多个og:图像标签? [英] Facebook sharer.php, how to have multiple og:image tags?

查看:103
本文介绍了Facebook sharer.php,如何有多个og:图像标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

Facebook Sharer如何选择图片?


我们正在使用Facebook的sharer.php服务来分享我们网站上的网页。现在这很好,但是我们现在很难找到如何向用户提供多个缩略图来从中挑选(sharer.php页面为多个图像提供一个UI,因此必须以某种方式进行)。 p>

我们目前有这个元标记:

 < meta property = og:imagecontent =http://www.mysite.com/myimage.jpg/> 

我们找不到任何建议如何做到这一点。有人有任何想法吗?

解决方案

我一直在使用多个图像一段时间。使用多个 og:image 元标记:

 < meta property =og:imagecontent =http://www.example.com/image01.jpg> 
< meta property =og:imagecontent =http://www.example.com/image02.jpg>

任何已经共享的页面(带有一个图像)都可以通过加载链接debugger / linter这里: https://developers.facebook.com/tools/debug/



调试器/ linter将不显示所有图像的预览 - 它只显示最后一个(我相信下面它提到了什么图像已经通过),但它的工作。


Possible Duplicate:
How does Facebook Sharer select Images?

We are using Facebook's sharer.php service to share pages on our site. Right now this works great, but we are now having difficult trying to find out how to offer users more than one thumbnail to pick from (the sharer.php page offers a UI for multiple images, so it must be possible somehow).

We have this meta tag currently:

<meta property="og:image" content="http://www.mysite.com/myimage.jpg" />

We couldn't find anything suggesting how to do this. Does anybody have any ideas?

解决方案

I've been using multiple images for a while now. Use multiple og:image meta tags like this:

<meta property="og:image" content="http://www.example.com/image01.jpg">
<meta property="og:image" content="http://www.example.com/image02.jpg">

Any pages that have already been shared (with one image) can be updated by loading the link in the debugger/linter here: https://developers.facebook.com/tools/debug/

The debugger/linter will not show a preview of all the images – it just shows the last one (I believe below it does mention what images it has pulled through) however it does work.

这篇关于Facebook sharer.php,如何有多个og:图像标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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