如果用户使用 Facebook SDK 分享按钮成功分享 post,则执行任务
Perform a task if post is shared successfully by the user using facebook SDK share button
我在我的网站上使用了 facebook SDK 分享按钮。如果用户成功共享网页,是否可以显示成功消息或执行任务?
查看示例 docs page:
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/',
},
// callback
function(response) {
if (response && !response.error_message) {
alert('Posting completed.');
} else {
alert('Error while posting.');
}
}
);
我在我的网站上使用了 facebook SDK 分享按钮。如果用户成功共享网页,是否可以显示成功消息或执行任务?
查看示例 docs page:
FB.ui(
{
method: 'share',
href: 'https://developers.facebook.com/docs/',
},
// callback
function(response) {
if (response && !response.error_message) {
alert('Posting completed.');
} else {
alert('Error while posting.');
}
}
);