Redirect post login on facebook

Asked

Viewed 732 times

0

Hello, would like to ask a question about the redirect of facebook post login. I made a Facebook application that the user can only see it when logged in and it will be in a tab. I installed the tab using Static HTML: iframe tabs. When I enter the outgoing page I redirect to the facebook login. However, when facebook does redirect it goes to the url where the application is and does not return to the tab. How to configure facebook callback to go back to tab and not to iframe url?

Some remarks:

In my file resposável by login I put this way:

$helper = new FacebookRedirectLoginHelper( 'https:urldoapp.com.br' );

If I put the url of the tab it’s redirect error not allowing. If I put the la tab url in the app settings in the Site URL field, facebook does not accept the url.

I can’t find how to do the right setup. Does anyone know any tutorial or how to do it correctly?

1 answer

0


Beware of the Urls you use for facebook check, as not all will be accepted for redirects.

Try manipulating via Javascript. See this:

<script src="http://connect.facebook.net/en_US/all.js">
  </script>
  <script>
      FB.init({
          appId: '??????????????', cookie: true,
          status: true, xfbml: true
      });
      FB.Event.subscribe('auth.login', function () {
          window.location = "http://example.com";
      });
  </script>
  <fb:login-button>
     Login with Facebook
  </fb:login-button>

References:

https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/ http://developers.facebook.com/docs/reference/javascript/FB.login/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.