Grr... I cant seem to get fql working. One thing, I think the docs are old because i dont think api() likes just an array. Anyway:
$user_id = $facebook->getUser();//works
$access_token = $facebook->getAccessToken();//works
$fql = 'SELECT name from user where uid = ' . $user_id;
$ret_obj = $facebook->api(array(
'method' => 'fql.query',
'access_token' => $access_token,
'query' => $fql,
));
print_r($ret_obj);// dont work. actually I get exceptions
I've tried all kinds of combinations of params for api(), to no avail.
$user = curl('https://graph.facebook.com/'.$user_id.'?access_token='.$access_token);
does work, though.