2012-05-07 34 views
1

我想改變「說些什麼...」文本部分的帖子給FB.ui的功能的功能Facebook發佈到牆JavaScript不允許我改變「說點什麼」文本

所有其他顯示,但它不會更改文本區域中的文本。

我的代碼如下:

function postToFeed() { 

    // calling the API ... 
    var obj = { 
     method: 'feed', 
     link: 'http://solarhelper.net', 
     picture: 'http://solarhelper.net/icon', 
     name: 'Find your result using Solar Helper', 
     caption: 'Click the link to download the app or get your result online.', 
     description: 'I could save ' + incomeYear25 + ' over 25 years and save ' + totalCO2Level + ' tonnes of CO2!', 
     message: 'Testing' 
    }; 

    function callback(response) { 
     if (response && response.post_id) { 
      alert('Post was published.'); 
     } else { 
      alert('Post was not published.'); 
     } 
    } 

    FB.ui(obj, callback); 

    } 

感謝您的幫助

+0

我已更新問題以顯示整個功能 –

回答

1

不幸的是,你不是,你將不能夠改變一個對話框的這一部分。

我想這種預防應該限制事件更多的垃圾郵件?

+0

我已經使用Appcelerator構建了一個iPhone應用程序,它也使用JavaScript,並且我已經能夠在那裏更改該文本。同時在網上看到一些例子,它強調它也可以做到。它只是不適合我。如果你看一下Facebook文檔中使用的示例圖像,它可以完成這個任務。http://developers.facebook.com/docs/reference/dialogs/feed/ –

+0

相信我,這是不可能的。嘗試轉到由文檔指定的鏈接(https://www.facebook.com/dialog/feed? app_id = 123050457758183& link = https://developers.facebook.com/docs/reference/dialogs/& 圖片= http://fbrell.com/f8.jpg& name = Facebook%20Dialogs& caption = Reference%20Documentation& description =使用%20Dialogs%20至%20interact%20與%20users。& redirect_uri = http:// www。 example.com/response'),你會看到你不會實現它 –

+0

@ user1136076是的,馬丁是正確的。您可以在請求中使用'message',但不能在feed文章中使用。 – Paulpro

相關問題