Facebook身份验证中客户端和服务器端之间有什么不同?

时间:2011-12-26 06:27:04

标签: javascript facebook

Facebook Authentication,他们说:

  

Facebook平台支持两种不同的OAuth 2.0流程供用户登录:服务器端(在规范中称为身份验证代码流)和客户端(称为隐含的流量)。只要您需要从Web服务器调用Graph API,就会使用服务器端流程。当您需要从客户端调用Graph API时,使用客户端流,例如在Web浏览器中运行的JavaScript或从本机移动或桌面应用程序调用。

但是,服务器端客户端身份验证之间有什么区别。 因为当我使用使用JS API的signed_request并将其传递给服务器时,有时会过期。

FB.getLoginStatus(function(response){
    if (response.authResponse && response.authResponse.signedRequest)
    {
        $.get(url,{
                'signed_request':response.authResponse.signedRequest
            },
            function(data){
                //The server response that the signed_request is expired.            
            }
    }
});

1 个答案:

答案 0 :(得分:0)

我认为这已在这里得到解答:https://stackoverflow.com/a/8143534/2938

相关问题