I have this pretty stock generic code. If i'm logged in (app admin) it shows all my status. If I log in with any other user, it shows nothing. Why?
<?php
header('p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"');
include_once('facebook.php');
$app_id = '289544004746';
// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
'appId' => '289544004746',
'secret' => '5772f9f5abbcc84e794c28169a399d4e',
'cookie' => true,
));
$session = $facebook->getSession();
$me = null;
// Session based API call.
if ($session) {
try {
$uid = $facebook->getUser();
$me = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
}
}
// login or logout url will be needed depending on current user state.
if ($me) {
$logoutUrl = $facebook->getLogoutUrl(array('next' => 'http://autobotcentral.info/logout.php'));
echo "<a href='$logoutUrl'>Log out </a>";
} else {
$loginUrl = $facebook->getLoginUrl(array('req_perms' => 'user_activities,user_status,read_status'));
echo "<a href='$loginUrl'>Login</a>";
?>
<html>
<head>
</head>
</html>
<?php
}
$result = $facebook->api(array(
'query' => 'SELECT uid,status_id,message FROM status WHERE uid = me()',
'method' => 'fql.query'));
print_r($result);
?>