Facebook Sharer不显示图像缩略图 [英] Facebook Sharer not showing image thumbnail

查看:125
本文介绍了Facebook Sharer不显示图像缩略图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

原始(工作)

小提琴>> http://jsfiddle.net/dYfwK/

<a href="http://www.facebook.com/sharer.php?s= 100&amp;p[title]=Title here&amp;p[url]=http://example.com&amp;p[images][0]=http://upload.wikimedia.org/wikipedia/commons/5/55/Kaasmarkt2_close.jpg&amp;p[summary]=I love cheese" target="_blank">Test</a>

已修改(图像未显示)

小提琴>> http://jsfiddle.net/dYfwK/6/

<a href="http://www.facebook.com/sharer.php?s= 100&amp;p[title]=Title here&amp;p[url]=http://example.com&amp;p[images]
    [0]=http://www.ucmas.com/wp-content/uploads/2013/07/rm.jpg&amp;p[summary]=I love cheese" target="_blank">Test</a>

我一直面对这个问题,最终我相信这个问题是由于图像。是大小还是其他造成这种情况的东西?

I've been facing this issue for sometime, eventually I believe this issue is due to the image. Is it the size or something else that caused this ?

推荐答案

当我这样做,它的作品:

When I do this it works:

<a href="https://www.facebook.com/sharer.php?s=100&p[title]=Title+here&p[url]=http://example.com&p[summary]=I+love+cheese&p[images][0]=http://www.ucmas.com/wp-content/uploads/2013/07/rm.jpg" target="_blank">Test</a>

您需要做的是删除& amp; amp; 从url替换为真实&我然后url编码没有链接的所有东西。这只是用 + 替换空格。我也把图像放在url的末尾。不知道为什么,但似乎这样做的伎俩。

What you need to do is remove &amp; from the url and replace it with real &. I then url encoded everything that wasnt a link. this just means replace spaces with +. I also put image at the end of the url. Not sure why but that seemed to do the trick.

这篇关于Facebook Sharer不显示图像缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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