Psy*_*sis 9 javascript facebook
这段代码正在分享脸书但是我想要如何检测Facebook分享成功我怎么能用javascript做到这一点
u = location.href;
t = document.title;
var myWindow = window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
return false;
Run Code Online (Sandbox Code Playgroud)
ant*_*rna 16
看来你应该使用FB.ui
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://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.',
message: 'Facebook Dialogs are easy!'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5797 次 |
最近记录: |