I have the following code right below the body tag of my application
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: '136904373......', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
FB.getLoginStatus(function(response) {
if (response.session) {
alert('Logged In');
} else {
alert('Not Logged In');
}
});
</script>
I'm currently getting the following error "FB not defined for FB.getLoginStatus(function(response) which makes me believe that the FB.init is not being loaded correctly. Anyone have any ideas (I've obscured the last 6 digits of my app idea on purpose)
Thanks