tags:

views:

314

answers:

1

Does anyone know of how to capture from Facebook analytics around the use of the "like" button--i.e., if I've got thousands of pages with the Like button on them, how to query Facebook to see how many likes each of them has received? Is there a Facebook API call for this?

Thanks!

+2  A: 

It's on their open graph documentation page here under "Programmatically administering your pages".

Just do a GET on "https://graph.facebook.com/?id={URL}"

Example they provide:

https://graph.facebook.com/?ids=http://www.imdb.com/title/tt0117500/

Returns some json:

{
   "114324145263104": {
      "id": "114324145263104",
      "name": "The Rock (1996)",
      "picture": "http://profile.ak.fbcdn.net/hprofile-ak-sf2p/hs252.snc3/23275_114324145263104_2071_s.jpg",
      "link": "http://www.imdb.com/title/tt0117500/",
      "category": "Movie",
      "fan_count": 328
   }
}
AdamB

related questions