1

A url http://www.cnn.com/2014/03/15/world/asia/malaysia-airlines-passenger-vignettes/index.html?hpt=hp_t1

How can I get the facebook like number or twitter posts number or google+ number from this url?

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • 1
    This question appears to be off-topic because it is not about computer programming. – Scott Barta Mar 27 '14 at 03:16
  • maybe you wanna take a look at this: http://stackoverflow.com/questions/9728279/getting-the-facebook-like-share-count-for-a-given-url .. even though it might be different with what you want, it might leads you to the right dirrection.. – Yohanes Khosiawan 许先汉 Mar 27 '14 at 03:20

1 Answers1

1

You can use the following FQL via the Graph API:

select url, like_count from link_stat where url='http://edition.cnn.com/2014/03/15/world/asia/malaysia-airlines-passenger-vignettes/index.html'

like this:

https://graph.facebook.com/fql?q=select%20url%2C%20like_count%20from%20link_stat%20where%20url%3D%27http%3A%2F%2Fedition.cnn.com%2F2014%2F03%2F15%2Fworld%2Fasia%2Fmalaysia-airlines-passenger-vignettes%2Findex.html%27

which gives the result

{
  "data": [
    {
      "url": "http://edition.cnn.com/2014/03/15/world/asia/malaysia-airlines-passenger-vignettes/index.html", 
      "like_count": 28529
    }
  ]
}
Tobi
  • 31,405
  • 8
  • 58
  • 90