Is it possible to get the number of facebook likes for a url?

前端 未结 3 767
你的背包
你的背包 2021-02-06 16:16

Ideally I would like to do this using javascript client side scripting only. If that is not possible then I\'d like to do this in such a way as to have the server do the least

3条回答
  •  醉话见心
    2021-02-06 16:46

    It's pretty simple, several other anwsers on SO already showed good examples. Basically use the Graph API: http://developers.facebook.com/docs/api to query info on your URL, for example: https://graph.facebook.com/?ids=http://www.stackloverflow.com . The API retuns a JSON object which should be easy to use with Javascript.

提交回复
热议问题