0

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.

Jean
  • 41
  • 6

1 Answers1

1

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

Invalid API Key

phwd
  • 19,975
  • 5
  • 50
  • 78
  • I Run app in www.tasolteiro.com The returns address all your friends who are unmarried: https://tasolteiro.com/fb-friends/all Before returning correctly, now no more. – Jean May 03 '13 at 00:55
  • See above... the image is there. – phwd May 03 '13 at 01:10
  • How strange. The application was functioning normally. Checked now and saw that he was excluded. Why is it? could imagine why? – Jean May 03 '13 at 01:16
  • No idea, if your app was removed the only option now would be to go to https://developers.facebook.com/appeal – phwd May 03 '13 at 01:19