I am trying to do facebook login on my web site, and I have been using the new Facebook Javascript SDK's FB.Login function.
The login works perfectly in FireFox and in Chrome. The login works in IE as well, however the problem is that the facebook popup window stays open blank (user is logged in and redirected, as needed).
Does anyone know any secret for IE so that the popup window will close?
Here is my code: (it is an asp.net mvc site so this is in a parial view)
<div id="fbLoginS" class="smallloginbutton facebooksmall">Facebook Login</div>
<div id="fb-root"></div>
<!-- facebook login -->
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
<% string facebookaction = Url.Action("FacebookLogOn", "Account");%>
FB.init({ appId: '<%:FacebookSettings.Current.AppId %>', status: true, cookie: true, xfbml: true });
$('#fbLoginS').click(function () {
FB.login(function (response) {
if (response.session) {
window.location = '<%:facebookaction %>';
} else {
// user cancelled login
}
}, { perms: "email" });
});
</script>
<!-- facebook login -->
Thanks a lot for the help, Apolka