Facebook JS API - 无法获取要发布的图像?
我正在尝试使用 FB.ui 方法将图片发布到墙上,并且它可以工作,但是一旦我尝试将图片实现到帖子中,它就会严重失败。
我已经使用 FB.api() 方法解决了这个问题,但希望用户弹出窗口并选择“发布”,而不是立即发布。
我的代码如下:
FB.ui({ method : 'feed',
message: userPrompt,
link : hrefLink,
caption: hrefTitle,
attachment: {
name: 'Test',
caption: 'Test2',
description: ( 'Test4'),
'media': [{ 'type': 'image',
'src': 'srcLink',
'href': 'imageLink'
}]
}
});
如果有人能帮助我那就太好了 - 这真的开始激怒我了!
提前致谢!
I'm trying to post to a wall using FB.ui method, and I have it working but as soon as I try to implement a picture into the post it's failing hard.
I have figured it out using FB.api() method but would like the user to have the popup and select "Post" as opposed to it posting immediately.
My code is as follows:
FB.ui({ method : 'feed',
message: userPrompt,
link : hrefLink,
caption: hrefTitle,
attachment: {
name: 'Test',
caption: 'Test2',
description: ( 'Test4'),
'media': [{ 'type': 'image',
'src': 'srcLink',
'href': 'imageLink'
}]
}
});
If anyone can help me out that'd be great- this is really starting to irritate me!
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果这是您的确切代码,那么 srcLink 和 imageLink 的变量不应包含在引号中。
If this is your exact code then your variables for srcLink and imageLink should not be contained in quotes.