I have followed the instructions to get access_token and use the graph API to get notifications. My PHP code is like:
echo "get limit 3 notifications";
$args = array(
'limit' => '3',
'access_token' => 'mytoken....'
);
$data = $facebook->api('/my_facebook_id/notifications','GET',$args);
$arrays = $data['data'];
echo "count size: ".count($arrays).;
print_r($arrays);
echo "<br/><br/>";
However, I always get zero notifications. Although, when I logged in, there is two new notifications in my home page.
Has anyone encountered such a problem?
Also, I want to get messages using the graph API but seems there is no
“http://graph.facebook.com/my_facebook_id/messages/”
Regarding to the notifications and messages, they are all in the top left bar, following friends requests.
I wonder if someone has experienced with this and can help.
1 Answer