I just started to use FQL, and I was trying some FB examples that worked fine.
But I try to make my own exapmles, but didn’t work…
I was trying to get the list of activities of a loged user, with this FQL code:
$f = new Facebook($configure); //configure is already ok
$user_id = $f->getUser();
if($user_id){
$ret = $f->api(array('method' => 'fql.query',
'query' => 'select eid, uid, rsvp_status
from event_member
where uid = '.$user_id.';'));
//I splitted the query here because is too long.
//In my PHP code is all in one line
print_r($ret);
}
but it returns a empty array.
I try it with my FB profile, even I accepted some incoming events, but I still get an empty list…
What am I doing wrong?
Thanks!
Well the query is perfectly right. I got the result using this.
Have you set the permissions:
user_eventsandfriends_eventsfor the user?