Facebook登录,redirect_uri不是应用程序所有。为什么? [英] Facebook login, redirect_uri is not owned by the application. why?
问题描述
我无法添加FB登录到我的网站。我只是注册了这个应用程序:
I can't add FB login to my site. I simply registered the application:
URL: http://www.chusmix.com/
DOMAIN: www.chusmix.com
然后我粘贴了登录代码,并替换了我的APP ID:
And then I pasted the login code and replaced my APP id in it:
<html>
<head>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId:'212044715486306', cookie:true,
status:true, xfbml:true
});
</script>
<fb:login-button>Login with Facebook</fb:login-button>
</body>
</html>
然而,当点击登录按钮时,我得到错误191:redirect_uri不拥有通过应用程序
However when clicking the login button I get Error 191: redirect_uri is not owned by the application
此代码在页面中: http://www.chusmix.com/game/ 根据Facebook说的填写字段DOMAIN使得该域中的所有页面都能够使用Facebook授权。但是我也试着直接指向登录按钮所在的域,并且得到相同的错误。
Also this code is in the page: http://www.chusmix.com/game/ according to what Facebook says filling the field DOMAIN makes all pages in the domain able to use Facebook Authorization. However I also tried pointing directly to the domain where the Login Button is and I get the same error.
甚至没有重定向网址。
更新:似乎登录在 http://www.chusmix.com/game/ ,但不在 http://chusmix.com/game/ (没有www)。
Update: It seems the Login works in http://www.chusmix.com/game/ but doesn't on http://chusmix.com/game/ (without www).
有没有办法让它工作,如果用户不输入www。或者我必须使用重定向?
Is there a way to make it work if the user doesn't type www.? Or do I have to use a redirect?
推荐答案
尝试将站点URL添加到应用程序设置编辑设置 - >网站 - >网站网址当您在那里时,您可以填写网站域,以备将来添加子域。
Try adding the site URL to the app settings Edit Settings->Web Site->Site URL. While you are there you might as well fill in the Site Domain in case you add sub domains in the future.
这篇关于Facebook登录,redirect_uri不是应用程序所有。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!