带有自定义标题、描述和图像的 Facebook 分享按钮
可能的重复:
Facebook Sharer 如何选择图像?
看起来 Facebook 支持自定义标题、描述和缩略图有多种方式。
到目前为止,我已经找到了两种解决方案。
使用元标记
[元名称=“标题”内容=“标题”/] [元名称=“描述”内容=“描述”/]
使用 URL 参数。
[a href='http://www.facebook.com/sharer.php?s=100&p[title]=WEB1CHANNEL&p[summary]=Web+Design+Company+in+Dubai .&p[url]=http://www.webchannel.ae&p[图片][0]=http://qacode.com/test.jpg']asdfa[/a]
我真的很喜欢解决方案#2,但它看起来不稳定。有时有效,有时无效。总的来说,无论如何它都有效。
使用解决方案#2 可以吗?以后还会有吗?
Possible Duplicate:
How does Facebook Sharer select Images?
It looks like that the Facebook support custom title, description, and thumbnail in several ways.
So far, I have found two solutions.
using meta tag
[meta name="title" content="title" /] [meta name="description" content="description" /]
using URL parameters.
[a href='http://www.facebook.com/sharer.php?s=100&p[title]=WEB1CHANNEL&p[summary]=Web+Design+Company+in+Dubai.&p[url]=http://www.webchannel.ae&p[images][0]=http://qacode.com/test.jpg']asdfa[/a]
I really like solution #2, but it looks like it is not stable. Sometimes it works, sometimes it does not. Overall, it works anyway.
Is it okay to use solution #2? Is it going to be available in the future?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
sharer.php
的参数,而是会尝试从页面获取信息。sharer.php
instead it'll try to get the info from the page.至于我所看到的解决方案 2 并不稳定。我在 facebook 以及这个论坛中也看到了许多与解决方案 2 相关的问题。我个人的经验是,最好将元标记与 xfbml 版本的 fb:share 一起使用。
It doesn't stop working in my experience.
As for as I have seen solution number 2 is not stable. I have seen many problems related to solution 2 in facebook as well as in this forum too. I have personally experienced that it is better to use meta tags with xfbml version of fb:share.
It doesn't stop working in my experience.