最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

facebook - What causes "requires valid signature" error when calling FQL from javascript SDK? - Stack Overflow

programmeradmin3浏览0评论

My site uses FQL called from javascript as such:

FB.api({
    method: 'fql.query',
    query: 'SELECT uid, name, first_name, pic_big, pic, third_party_id from user where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name'
},
function(response) {
    if( response.error_msg ) {            
        alert("Sorry!  Something went wrong loading your Facebook friends:"+response.error_msg);
        return;
    }
    process_friends(response);
});

}

They get here after a normal FB.login() call. This is working fine for most users. But some users (or user sessions at least) consistently get the "requires valid signature" error and can't get past this, even after FB.login()'ing in again.

What does that error really mean? I'm guessing the oauth token is invalid? But the token came from within the javascript SDK -- I never touched it, and didn't make the signature. Could the user be in an inconsistent login state? Insufficient app privileges? Some strange cookie setting?

My site uses FQL called from javascript as such:

FB.api({
    method: 'fql.query',
    query: 'SELECT uid, name, first_name, pic_big, pic, third_party_id from user where uid in (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY name'
},
function(response) {
    if( response.error_msg ) {            
        alert("Sorry!  Something went wrong loading your Facebook friends:"+response.error_msg);
        return;
    }
    process_friends(response);
});

}

They get here after a normal FB.login() call. This is working fine for most users. But some users (or user sessions at least) consistently get the "requires valid signature" error and can't get past this, even after FB.login()'ing in again.

What does that error really mean? I'm guessing the oauth token is invalid? But the token came from within the javascript SDK -- I never touched it, and didn't make the signature. Could the user be in an inconsistent login state? Insufficient app privileges? Some strange cookie setting?

Share Improve this question edited Apr 5, 2011 at 19:50 Leopd asked Apr 5, 2011 at 18:14 LeopdLeopd 42.8k32 gold badges137 silver badges172 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

It does mean that you need a valid access token.

EDIT: A better link to the documentation: https://developers.facebook./docs/concepts/login/access-tokens-and-types/

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论