我的代码中有一个 fql 查询,直到上周(或前后)都运行良好,然后突然停止工作。
我现在收到一个奇怪的 #803 错误以及消息“您请求的某些别名不存在:”这是很奇怪的(我相信这是一个完全的红鲱鱼),因为我现在已经尝试删除我以前的所有别名并用“名称”替换它们。
完全在我的绳索末端试图弄清楚Facebook在过去几周发生的变化会导致这种情况。如果有人有任何见解,我将非常感激听到它。
我在这里发布我的代码,但我并不期待任何关于代码本身的评论,因为它在几个月内完美运行,直到过去两周左右的某个时间点。
代码的具体目的是为用户获取一个身份验证令牌,然后检索 /me 请求中不可用的一些更详细的信息。
//I call this first to get the token
function checkStatus() {
try{
FB.getLoginStatus( function( loginResponse ){
if( loginResponse.status == "connected" ){
authToken = loginResponse.authResponse.accessToken;//this comes back as expected
expiresIn = loginResponse.authResponse.expiresIn;//this comes back as expected
getUserInfo();
} else {
registerApp();//this gets called if the user hasn't approved the app yet... this continues to work as expected
}
} );
}
catch(e){
alert("ERROR" + e);
}
}
//so the above method calls this
function getUserInfo(){
FB.api( "/me", function( meResponse ){
meResponse.authToken = authToken;
meResponse.expiresIn = expiresIn;
console.log("meResponse = " + JSON.stringify(meResponse));
//this contains all the correct expected data
FB.api(escape("/fql&q=SELECT name FROM user WHERE uid = '"+ meResponse.id +"'"),//here I've eliminated ALL extra aliases (though none of them were a problem before
function( response ){
console.log("RESP = " + JSON.stringify(response)); //this comes back with the following error:
//{"error":{"message":"(#803) Some of the aliases you requested do not exist: fql&q=SELECT name FROM user WHERE uid = 'xxxxxxxxx'","type":"OAuthException","code":803}}
}
)
} );
}