Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect Facebook share success? with Javascript

This code is sharing 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; 
like image 702
PsyGnosis Avatar asked Jun 28 '11 12:06

PsyGnosis


Video Answer


1 Answers

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.');
     }
   }
 );
like image 100
anton_byrna Avatar answered Oct 19 '22 15:10

anton_byrna