The FB.getLoginStatus function doesn't work for me for some reason - although it used to for some time. Very basic code below, and the alert never popups - looks like FB.getLoginStatus never calls the supplied function. Any ideas ?
<body>
<form id="form1" runat="server">
<div id="fb-root">
</div>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
FB.init({ appId: 'xxx', status: true, cookie: true, xfbml: true });
FB.getLoginStatus(function (response) {
alert("Hi there");
});
</script>
</form>
If your app is in Sandbox Mode see this bug: https://developers.facebook.com/bugs/240058389381072
Also read the comments by Philip Bulley
This bug has been confirmed and assigned.
In which platform you are developing the application??If it is FBML then check FBJS-Facebook JavaScript.I think alert will not work in FBML application. I got this working..Just check