我试图将图像上传到我的用户的Facebook墙上,一旦他们打了一个钮FACEBOOK JS SDK ::如何张贴图片上墙
我使用的JavaScript SDK,但我有一个问题,图像看起来像一个在墙上的链接...但这不是我想要的...我想发布一个图像...相同,当你把你的状态文本字段上的图像链接,它变成图像
有帮助吗?
FB.ui(
{
method: 'stream.publish',
message: 'test',
attachment :{
'name': 'i\'m bursting with joy',
'href': ' http://bit.ly/187gO1',
'caption': '{*actor*} rated the lolcat 5 stars',
'description': 'a funny looking cat',
'properties': {
'category': { 'text': 'humor', 'href': 'http://bit.ly/KYbaN'},
'ratings': '5 stars'
},
'media': [{
'type': 'image',
'src': 'http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg',
'href': 'http://bit.ly/187gO1'}]
},
user_message_prompt: 'Share your thoughts about Connect'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
但有没有办法上传图像到用户墙? – trrrrrrm 2010-07-31 11:15:19
@ From.ME.to.YOU很好,图像将作为图标发布到墙上,而不是链接。那是你需要的吗?上传是什么意思? – serg 2010-07-31 15:25:16
@serg嘿,这工作正常,但你能告诉我如何张贴在朋友墙?我想有一个按钮,点击后会“询问”是否将图像张贴到朋友墙上或不是。 – Surya 2012-08-25 14:34:27