I will try to be as concise as possible.
Objective: Get a list of names of everyone who liked my Facebook page. This will be done in an application installed on that page. The app will then be used to create a lottery and chose a winner.
What I have so far is: appId, appSecret and an Acces-Token with me as an admin of that page. I have also found online that a query like this one would in fact do what I need:
*SELECT user_id from like where object_id = \'PAGE_ID\';'*
My question is : How do I run the query in order to make it work?
So far I have tried but all I get is an empty array...
$result2 = $facebook->api(array(
'method' => 'fql.query',
'access_token' => 'TOKEN',
'query' => 'SELECT user_id from like where object_id = \'APP_ID\';'
));
;
Any help is appreciated, Thank you.