当有人在我的网站上点击一个按钮时,我可以使用以下工具向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上发布一些内容有没有类似的东西。在
tweet Web Intent可能是与FB示例最方便的模拟。在
这个答案给出了tweet web意图的一个示例用法:https://stackoverflow.com/a/19426405/1637295
到这里来看看关于twitter API响应的更多信息https://dev.twitter.com/docs/error-codes-responses
相关问题 更多 >
编程相关推荐