如何将缩略图张贴给Facebook / links对象? [英] how does one post a thumbnail picture to a Facebook /links object?

查看:84
本文介绍了如何将缩略图张贴给Facebook / links对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发布到/ feed的工作不正常,不适用于发布到/链接。虽然没有产生错误,并且我得到一个ID回来指示成功,但我指定为picture = http://site/url/photo.gif的缩略图不显示。这是我使用的命令:

What works fine for posting to a /feed does not work the same for posting to /links. While no error is generated, and I get an ID back indicating success, the thumbnail I specified as "picture=http://site/url/photo.gif" does not show up. Here is the command I used:

curl -F \
     "picture=http://tycho.usno.navy.mil/gif/moons/m146.gif" \
     -F "message=How I look tonight to my worshippers on Earth" \
     -F "name=Current Moon Phase" \
     -F "link=http://www.calculatorcat.com/moon_phases/phasenow.php" -F caption="How the Moon appears tonight" \
     -F "access_token=111111111111111|2222222222222222222222222|33333333333333333333456n" \
     "https://graph.facebook.com/215958041750734/links"

现在,相同的数据,但发布到月球的墙壁(饲料),按预期工作:

Now, the same data, but published to The Moon's wall (feed), works as expected:

curl -F \
     "picture=http://tycho.usno.navy.mil/gif/moons/m146.gif" \
     -F "message=you're looking great tonight!" \
     -F "name=Current Moon Phase" \
     -F "link=http://www.calculatorcat.com/moon_phases/phasenow.php" -F caption="How the moon appears tonight" \
     -F "access_token=111111111111111|2222222222222222222222222|33333333333333333333456n" \
     "https://graph.facebook.com/215958041750734/feed"

两者的结果可以在Facebook月球页面的6月13日的帖子中看到: https://www.facebook.com/pages/The-Moon/215958041750734

The results of both can be seen in the June 13 posts on the Facebook "The Moon" page: https://www.facebook.com/pages/The-Moon/215958041750734

任何方式可以将缩略图显示在月球自己的帖子/链接?

Any way to get the thumbnail picture to show up on The Moon's own post to /links?

推荐答案

从实验中可以看出,picture =选项(如果存在)被忽略。它从页面本身拉一个缩略图,如果有任何图像恰好在它上面;否则不能显示缩略图。作为解决方法,可以在自己的控制下,框架集或iframe中将所需内容嵌入到服务器上,并将所需的缩略图嵌入到该页面中,将该链接发布到所需的Facebook ID /链接对象。

From experimentation, it turns out that the "picture=" option, if present, is ignored. It pulls a thumbnail from the page itself, if any images happen to be on it; otherwise no thumbnail can be displayed. As a workaround, one could embed the desired content on a server under his own control, in a frameset or iframe, and embed the desired thumbnail in that page, posting that link to the desired facebook id's /links object.

这篇关于如何将缩略图张贴给Facebook / links对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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