2012-11-08 49 views
-1

我在“权限请求”页面中测试了我们的Facebook应用程序。什么是正确的方式,FB应用程序的“权限请求”页面

根据该网站的介绍, http://developers.facebook.com/docs/howtos/login/server-side-login/#step5

(A)正确 如果用户决定是否拒绝授权在登录对话框中您的应用程序,他们反而会被重定向到:


YOUR_REDIRECT_URI? 
&error_reason=user_denied 
&error=access_denied 
&error_description=The+user+denied+your+request. 
&state=YOUR_STATE_VALUE 
~~~~~~ 

(B)。但是,我们的试验结果(17月/ 10月/ 2012)


&error_reason=user_denied 
&error=access_denied 
&error_description=The+user+denied+your+request. 
&0=13504605426376027014824690496996#_=_ 
~~ 

有(A)和(B)之间的差。 有什么建议吗?

回答

0

试试这个

if($user) { 

    $me = $fb->api('/me'); 
    } else { 
$url = "https://graph.facebook.com/oauth/authorize?" 
       ."client_id=app_idxxxxxxxxx&" 
       ."redirect_uri=http://apps.facebook.com/app_idxxxxxxxxx/&" 
       ."scope=user_photos,publish_stream"; 
    echo "<script language=javascript>window.open('$url', '_parent', '')</script>"; 

     exit(); 
} 
+0

非常感谢你! –

相关问题