[英]how to share in twitter like sharing some text in facebook using facebook javascript sdk
When someone clicks a button in my website, I am able to share some content to facebook using this: 当有人单击我网站上的按钮时,我可以使用以下方式将某些内容共享给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.');
}
}
);
Is there anything similar to that for tweeting some content in twitter. 有什么类似于在Twitter上发布某些内容的内容。
转至此处,了解有关Twitter API响应的更多信息https://dev.twitter.com/docs/error-codes-responses
The tweet Web Intent might be the most convenient analogue to your FB example. tweet Web Intent可能是您的FB示例最方便的模拟。
This answer gives an example usage of a tweet web intent: https://stackoverflow.com/a/19426405/1637295 此答案给出了推文Web意图的示例用法: https : //stackoverflow.com/a/19426405/1637295
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.