我曾经把这个功能叫做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刚刚删除了这个功能吗?
答案 0 :(得分:2)
您的代码中出现错误。
您的API调用以/fql&q=QUERY
开头,应为/fql?q=QUERY
答案 1 :(得分: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正确的界面。
答案 2 :(得分:-2)
我检查了facebook官方网站的doc格式..它跟我做的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/