2

我正在尝试在我的本地机器上开发。我已将 facebook 站点 URL 设置为

http://localhost:8000

我的登录代码:

function tryFBLogin() {
   FB.login(function(response) {
   if (response.authResponse) {
            console.log("User is connected to the application.");
            var accessToken = response.authResponse.accessToken;
            return  http.HttpResponseRedirect(reverse('http://localhost:8000/page/'))
        } else {
            console.log("Something messed up in facebook login");
        }
    });
}

当我单击登录按钮时,我收到此错误消息:

API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.
4

1 回答 1

1

重定向参数必须与应用程序的域匹配。

将应用程序域设置为空白,并将站点 url 设置为您正在显示的链接的根目录。

App Domain: 
Site URL: http://localhost:8000
于 2012-08-01T01:17:23.943 回答