title: How to redirect to a page after facebook login using javascript?
body: <pre><code>&lt;body&gt;
        &lt;div id="fb-root"&gt;&lt;/div&gt;
        &lt;script src="http://connect.facebook.net/en_US/all.js"&gt;&lt;/script&gt;
        &lt;script&gt;
           FB.init({ 
              appId:'OUR_APP_ID', cookie:true, 
              status:true, xfbml:true 
           });
        &lt;/script&gt;
  
        &lt;script&gt;
          FB.Event.subscribe('auth.login', function(response) {
          alert("Logged in.. Redirecting you now...");
          window.location = 'http://localhost:7001/Facebook/success.jsp';
          });
        &lt;/script&gt;
  
        &lt;fb:login-button perms="email,publish_stream,about_me" onlogin="window.location='http://localhost:7001/Facebook/success.jsp'"&gt;&lt;/fb:login-button&gt; 
  &lt;/body&gt;
  </code></pre>
  
  <p>I am able to login to Facebook using the  tag. But, after that, I need to redirect the user to another page where I can display his/her data like Name, email, gender, etc. The window.location for redirection isn't working. This problem is not only for localhost. The problem persists even if I put google in place of the localhost URL. Does facebook not allow javascript redirection anymore or has facebook decided to stop supporting onlogin which is not a DOM event on its own but a specific from Facebook? Please help me. Thanks in advance!</p>