我正在尝试在我的本地计算机上进行开发。我已将Facebook站点网址设置为
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.
答案 0 :(得分:1)
重定向参数必须与应用的域匹配。
将应用程序域设置为空白,并将站点URL设置为您正在显示的链接的根目录。
App Domain:
Site URL: http://localhost:8000