簡體   English   中英

如何在Twitter中分享,例如使用Facebook javascript SDK在Facebook中分享一些文本

[英]how to share in twitter like sharing some text in facebook using facebook javascript sdk

當有人單擊我網站上的按鈕時,我可以使用以下方式將某些內容共享給Facebook:

FB.ui(
{
    method: 'feed',
    name: 'Facebook Dialogs',
    link: 'https://developers.facebook.com/docs/reference/dialogs/',
    picture: 'http://fbrell.com/f8.jpg',
    caption: 'Reference Documentation',
    description: 'Dialogs provide a simple, consistent interface for applications to interface with users.'
},
function(response) {
    if (response && response.post_id) {
    alert('Post was published.');
    } else {
    alert('Post was not published.');
    }
}
);

有什么類似於在Twitter上發布某些內容的內容。

轉至此處,了解有關Twitter API響應的更多信息https://dev.twitter.com/docs/error-codes-responses

tweet Web Intent可能是您的FB示例最方便的模擬。

此答案給出了推文Web意圖的示例用法: https : //stackoverflow.com/a/19426405/1637295

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM