开发者

How to detect Facebook share success? with Javascript

开发者 https://www.devze.com 2023-03-16 08:42 出处:网络
This code is shari开发者_如何学运维ng facebook but I want How to detect facebook share success How Can I do that with javascript

This code is shari开发者_如何学运维ng facebook but I want How to detect facebook share success How Can I do that with 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; 


It seems you should use 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.');
     }
   }
 );
0

精彩评论

暂无评论...
验证码 换一张
取 消