1

I am dynamically generating Like buttons for an app.

I use FB.XFBML.parse(document.getElementById("fbook"))

and can indeed create likes for dynamic pages. All these likes are then sent to my Facebook App. Is it possible to track which of the pages were liked by users?

Stpn
  • 6,202
  • 7
  • 47
  • 94

1 Answers1

1

You could use this:

FB.Event.subscribe('edge.create',
    function(response) {
      alert('You liked the URL: ' + response);
    }
);

This method attaches an handler to an event and invokes your callback. In the example is the anonymous function. In this way you can track any like button in page.

freedev
  • 25,946
  • 8
  • 108
  • 125
  • There is no way to do that by querying Facebook-Graph-API or Insights? If I want to see wether someone else has shared / liked the link? – Stpn Dec 10 '12 at 22:05
  • :) I have answered this question few months ago here: http://stackoverflow.com/questions/6137414/how-to-fetch-facebook-likes-share-comments-count-from-an-article/7707702#7707702 – freedev Dec 10 '12 at 22:14