I need to get the facebook page like count without user login. I want to show the count on my webpage. I don’t want an FB Button, need to show the count only. I saw that several people are using graph api, But I think it requires an accesstoken, so it also required to login by the user. I don’t want that kind of stuffs. Guys help me with a solution. I will also trying, if I get a solution before, will comment here.
Question posted in Facebook API
The official documentation for the Facebook APIs can be found here.
The official documentation for the Facebook APIs can be found here.
2
Answers
GET Request + Regex
To get pages likes you can perform GET request to this Facebook link with your page:
and then find the like count with regex.
This would be the API call:
https://graph.facebook.com/[page-id]?fields=name,fan_count&access_token=[any-access-token]
The response (JSON):
About Tokens in general: