开发者

get facebook likes count in iphone-sdk

开发者 https://www.devze.com 2023-02-28 07:10 出处:网络
I don\'t want to show Like button... I just want to get the Number of count that has been liked for particular link... Just Cont.. No like 开发者_StackOverflowbutton No dialogue Nothing Just do a simp

I don't want to show Like button... I just want to get the Number of count that has been liked for particular link... Just Cont.. No like 开发者_StackOverflowbutton No dialogue Nothing


Just do a simple url request to the Graph API:

http://graph.facebook.com/[FULL URL]

Example:
http://graph.facebook.com/http://www.stackoverflow.com

Edit: (an example with "LIKES")
http://graph.facebook.com/http://www.imdb.com/title/tt0117500/

Awesome, isn't it?


Just wanted to mention that if your URL has any question marks or ampersands in it, you will need to use a different notation:

http://graph.facebook.com/?id=[PROPERLY ENCODED FULL URL]

For example: http://graph.facebook.com/?id=http://mydomain.com/viewsomething.php%3Fid%3D2

0

精彩评论

暂无评论...
验证码 换一张
取 消