1

我曾经调用这个函数来获取 facebook 朋友...

FB.api('/fql&q=SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 0', function(response) {

但是突然,今天早上..它不再起作用了,我收到了这个错误消息....

FB.ApiServer._callbacks.f507d012c({"error":{"message":"(#803) Some of the aliases you requested do not exist: fql&q=SELECT uid, name, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1","type":"OAuthException","code":803}});

发生了什么?facebook刚刚删除了这个功能吗?

4

3 回答 3

2

您的代码中有错误。

您的 API 调用以 开头/fql&q=QUERY,应该是/fql?q=QUERY

于 2012-12-11T18:11:36.663 回答
1

SDK的正确用法是:

FB.api('fql', { q: 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 0' }, function(response) { /* ... */ });

通常,您指定的路径在其当前状态下无效。不允许使用空格和 () 等字符。URL 查询字符串必须正确编码。您可能很幸运,您的 FQL 将正确地进行 URL 编码,但您不应该碰运气。像我上面所做的那样使用 SDK 的正确接口。

于 2012-12-11T19:57:18.440 回答
-2

我检查了 doc form facebook 官方网站.. 它与我有完全相同的 api 调用.. 仍然不知道为什么会发生这个错误

 FB.api('/fql&q=SELECT uid, name, is_app_user, pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1',

功能(响应){ ...

https://developers.facebook.com/docs/guides/games/custom-muti-friend-selector/

于 2012-12-11T18:32:33.980 回答