Reputation: 12244
It's not clear in the documentation how you can access the likes of a page. I know i can access my likes easily, but a client of mine would like us to be able to read all the likes each 5 minutes for example and detect who is the 2000th liker.
The problem is that i can't even seem to understand how to get an access token to a specific page.
My understanding although still very obscure to me would be that i need to create an app that asks for this user to authenticate as the page and authorize the app to get the likes of that page?
Am i right?
When responding, can you please provide a basic code base to understand how to do it, i've done 1 facebook login so far and it was hell...
Thanks
UPDATE
Important, when i'm talking about a page, i'm talking about a facebook page, not an external page on the web. The exact page i'm looking to get the likes from is:
http://www.facebook.com/starfrit
Upvotes: 1
Views: 853
Reputation: 30721
getting the actual like for any given page is easy, but you cant find out which user gave them. (or in which order)
$result = $facebook->api(array(
'method' => 'fql.query',
'query' => 'select fan_count from page where page_id = 140812822635148;'
));
or without api:
http://graph.facebook.com/140812822635148
or for an external url:
http://graph.facebook.com/http://www.redbull.com
Upvotes: 1