The event of entering the div is attached below. If I click on it, I will get the expected js sdk popup. However, after sending a pop-up window with my credentials, the pop-up window turns white and does not close. If I refresh the page, I am logged in, but it does not refresh automatically, as you might expect. Does anyone have any ideas?
Edit: The same code (with id and domain credentials) runs on a different server. This makes me think that my problem may not be related to the code below. Are there any application or server configurations that could cause the login popup to not be able to close / update?
<!DOCTYPE html>
<html class="no-js ie ie10plus" lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object#">
<script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.0.6-development-only.js"></script>
</head>
<body>
<div id="fb-root"></div>
<div id="fbLogin">Test login link</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" ></script>
<script>
var fbmm = {};
window.fbAsyncInit = function() {
FB.init({
appId : '339910146083688',
cookie: true,
xfbml: true,
status: true,
oauth: true
});
$(document).ready(function(){
$("#fbLogin").click(function(){
console.log('test');
FB.login(function(response) {
if (response.authResponse) {
console.log('Welcome! Fetching your information.... ');
FB.api('/me', function(response) {
console.log('Good to see you, ' + response.name + '.');
});
} else {
console.log('User cancelled login or did not fully authorize.');
}
});
});
});
};
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
</body>
</html>