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

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

问题描述

发布到/feed 的工作正常对于发布到/links 的工作并不相同.虽然没有生成错误,并且我得到一个指示成功的 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"

两者的结果都可以在 6 月 13 日 FacebookThe Moon"页面上的帖子中看到: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

有什么办法可以让缩略图显示在 The Moon 自己的/links 帖子上?

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

推荐答案

从实验中可以看出,picture="选项(如果存在)会被忽略.如果页面上有任何图像,它会从页面本身中提取缩略图;否则无法显示缩略图.作为一种变通方法,可以将所需的内容嵌入到他自己控制的服务器上的框架集或 iframe 中,然后在该页面中嵌入所需的缩略图,将该链接发布到所需的 facebook id 的/links 对象.

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天全站免登陆