1

我想在没有 JS SDK 的情况下使用 facebook 客户端身份验证来避免弹出。我尝试了很多不同的代码,但很多小时都没有工作,请帮忙。

这是我的代码

FB.init({
    appId  : appId,
    status : true,  // check login status
    cookie : true,  // enable cookies to allow the server to access the session
    xfbml  : false, // parse XFBML
    channel : 'http://fb.spot-the-differences.com/index.php',
    oauth : true
});
FB.getLoginStatus(function(response) {
    if (response.status == 'connected') {
        ...
    } else if (response.status === 'not_authorized') {            
    top.location = "https://www.facebook.com/dialog/oauth?client_id=" + 
    appId + "&redirect_uri='" +
    encodeURIComponent('http://fb.spot-the-differences.com') +
    "'&scope=read_friendlists,publish_actions,publish_stream,email&esponse_type=token";
});

我尝试添加 /index.php ,将 url 更改为 ip 地址尝试了很多代码,但它总是错误

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri isn't an absolute URI. Check RFC 3986.

脸书基本设定

Site URL: http://fb.spot-the-differences.com/
Canvas Page: http://apps.facebook.com/spot-the-differences
Canvas URL: http://fb.spot-the-differences.com/
Secure Canvas URL: https://fb.spot-the-differences.com/
4

1 回答 1

2
于 2012-08-24T12:08:30.493 回答