开发者

Facebook login, redirect_uri is not owned by the application. why?

I can't add FB login to my site. I simply registered the application:

URL: http://www.chusmix.com/
DOMAIN: www.chusmix.com

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>

However when clicking the login button I get Error 191: redirect_uri is not owned by the application

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 开发者_JAVA百科same error.

There isn't even a redirect url.


Update: It seems the Login works in http://www.chusmix.com/game/ but doesn't on http://chusmix.com/game/ (without www).

Is there a way to make it work if the user doesn't type www.? Or do I have to use a redirect?


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.


Use this as you Site Domain: chusmix.com


Make sure every URL in your JS script matches EXACTLY to the Site URL you set up in Facebook, including http://.

Ex:

 FB.init({
      appId      : '128957350986', // App ID
      channelUrl : 'zazzlebaytobreakers.com/lib/channel.php', // Channel File

Will cause this error in IE 7 and 8.

Make sure it's:

 FB.init({
      appId      : '128957350986', // App ID
      channelUrl : 'http://zazzlebaytobreakers.com/lib/channel.php', // Channel File
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜