I can login but the script below is not printing my status. What can I do to make it work?
require_once 'facebook.php';
$facebook = new Facebook($appapikey, $appsecret);
?>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB.init('<?php echo $appapikey; ?>', "xd_receiver.htm");
</script>
<?php
if(!$facebook->get_loggedin_user())
{
?>
<fb:login-button size="large" length="long"></fb:login-button>
<?php
}
else
{
//Gets my user id - 1594711371.
$user = $facebook->api_client->user;
$status= $facebook->api_client->fql_query("SELECT status FROM user WHERE uid =".$user."");
echo "<pre>";
print_r($status);
echo "</pre>";
}