FQL query returning empty.
I run the following FQL in https://developers.facebook.com/tools/explorer :
SELECT uid, name, username, birthday_date, current_location, online_presence FROM user WHERE relationship_status ='Single' AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) LIMIT 30 OFFSET 0
She successfully returns all my friends who are single.
However, when I run the PHP, nothing is returned:
$fql = "SELECT uid, name, username, birthday_date, current_location, online_presence FROM user WHERE relationship_status ='Single' AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) LIMIT 30 OFFSET 0";
$solteiros = $facebook->api(array(
'method' => 'fql.query',
'access_token' => $userAccessToken,
'query' => $fql,
));
Until yesterday it was working fine. Today when I test, it happened.
If it runs in the Explorer and not in your PHP app, you are most likely seeing a difference in access token clearance. That is, the access token supplied to Explorer has the permissions needed while the token used for your app does not.
Verify by calling /me/permissions
on your PHP application to see what is there.
Your site also gives an invalid api key error
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.