简体   繁体   English

FQL查询返回空数组

[英]FQL query returning empty array

FQL query returning empty. FQL查询返回空。

I run the following FQL in https://developers.facebook.com/tools/explorer : 我在https://developers.facebook.com/tools/explorer中运行以下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

She successfully returns all my friends who are single. 她成功地返回了我所有的单身朋友。

However, when I run the PHP, nothing is returned: 但是,当我运行PHP时,未返回任何内容:

$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. 如果它在资源管理器中运行,而不是在您的PHP应用程序中运行,则很可能会看到访问令牌清除方面的差异。 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. 通过在PHP应用程序上调用/me/permissions进行验证,以查看其中的内容。

Your site also gives an invalid api key error 您的网站还给出了无效的api键错误

无效的API密钥

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM