有关此调用的所有内容都可以工作,除了图片不会显示。我在SO上找到了一个other question,但没有解决问题。
你知道为什么这个没有显示图片吗?据我所知,FB正在吃图片,因为它甚至没有在对话框中显示为标签,如果我弄乱了URL,它会检测到问题并抛出错误消息,但为什么它要吃图片呢?
FB.ui({method: 'feed',
app_id: 'XXXX',
name: 'This is the name field',
link: 'http://localhost:8080/facebook/',
picture: 'http://localhost:8080/img/sample.gif',
caption: 'This is the caption',
description: 'Description field'},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
});发布于 2011-09-05 12:42:22
因为您将代码放在localhost中。Facebook并不真正知道你的“本地主机”在哪里。将您的代码放到公共主机上,并写入ip路径或域名。
https://stackoverflow.com/questions/7303749
复制相似问题