1

I am using facebook like button on my website for increasing popularity of my website so when any user click on like or dislike button at that time I am able to get button click event by following code

    FB.Event.subscribe("edge.create", function(targetUrl) {     
      console.log('Like button clicked');     
    });

    FB.Event.subscribe("edge.remove", function(targetUrl) {       
      console.log('Unlike button clicked');
    }) ;

But some time New window is displayed with like button at that time I am unable to get click event. I am attaching image as well for better understanding purpose

Facebook new window with like button image

Can anybody help me on this? I just want to get status or access of like button or cancel button from newly opened window. Can anybody help me on this?

mplungjan
  • 169,008
  • 28
  • 173
  • 236
  • Possible duplicate of [Facebook "Like" button callback](https://stackoverflow.com/questions/2798622/facebook-like-button-callback) – Matthew Herbst Oct 21 '18 at 18:05
  • Also, linked in that possible duplicate, is this possible duplicate: https://stackoverflow.com/questions/52042404/facebook-like-callback-event-using-edge-create-is-not-working – Matthew Herbst Oct 21 '18 at 18:06
  • @MatthewHerbst this is no duplicate question as I want to capture like button click event from facebook popup where after clicking popup like button page gets reload as well. – Navjyot Gaonkar Oct 22 '18 at 05:18
  • 1
    you do know that the like event callback is deprecated, right? – andyrandy Oct 22 '18 at 06:18
  • @NavjyotGaonkar those questions will show you that as far as the SO knowledge in those questions knows, that is not possible, though there do seem to be some hacks around it in the answers to those questions – Matthew Herbst Oct 22 '18 at 19:23

0 Answers0