views:

113

answers:

2

Hi,

I am trying to implement Facebook Connect with the new facebook connect.js1.

I am following "Single Sign-on with the JavaScript SDK" documented at: http://developers.facebook.com/docs/authentication

I Initialized connect.js like following:

<div id="fb-root"></div>
    <script language="JavaScript" type="text/javascript">
      window.fbAsyncInit = function () {
        FB.init({
          appId: '1234567',
          cookie: true,
          status: true,
          xfbml: true
       });
   };
   (function () {
     var e = document.createElement('script'); e.async = true;
     e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
     document.getElementById('fb-root').appendChild(e);
    }());
   </script>

and I am trying to render the Facebook Sign in button like following

<div>
  <span id="fb_login_button">
    <fb:login-button js="jquery">Sign In with Facebook</fb:login-button>
  </span>
</div>

A "Sign In with Facebook" button appears but when I click on it, I get following error

An error occurred with <app-name> Application. Please try again later.

API Error Code: 100
API Error Description: Invalid parameter
Error Message: next is not owned by the application.

What could be wrong?

I googled a little bit and found a solution here at: http://www.scottmurphy.info/facebook-ap … pplication

It asks me to update "Post-Authorize Redirect URL". But there is no place in my application settings where I can save that.

A: 

Ok I solved it.

In the "Site URL" of the "Web Site" tab I had https://myapplication.com instead of http://myapplication.com/

Notice "https"

Waseem
A: 

I was doing same thing, except my problem was that i had adding in "www" instead of just http://myapp.com