<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId:'OUR_APP_ID', cookie:true,
status:true, xfbml:true
});
</script>
<script>
FB.Event.subscribe('auth.login', function(response) {
alert("Logged in.. Redirecting you now...");
window.location = 'http://localhost:7001/Facebook/success.jsp';
});
</script>
<fb:login-button perms="email,publish_stream,about_me" onlogin="window.location='http://localhost:7001/Facebook/success.jsp'"></fb:login-button>
</body>
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!