Reputation: 19
Is it possible to get the number of fans of a facebook page in simple text without using facebook API? I have been searching on google, but none of them works, which can be because of change in facebook api. I don't want to include the api because i want to add that piece of code in a theme, which will be used by multiple people. Thanks.
Upvotes: 0
Views: 2172
Reputation: 21
Followed, above steps earlier, it worked. Offlate it keeps throwing an error use access token.
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104,
"fbtrace_id": "AN1JLj+DAks"
}
}
Upvotes: 2
Reputation: 671
The Graph API is very easy to use and you dont need any authentication so I really can't see any reason not to use it.
Just do a simple HTTP get to the follow URL: https://graph.facebook.com/norwegianmafia
(replace "norwegianmafia" with your page name)
You could also easily use this method in jQuery:
$.getJSON("https://graph.facebook.com/norwegianmafia?callback=?", function(data) {
alert("Likes: " + data.likes);
});
Upvotes: 5