我試圖將圖像上傳到我的用戶的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