im making switch to the new Graph API , and i try to replace all the rest api with the new Graph api reading the docs i saw i have some kind of real time function ( im not s
A GraphAPI-way: you can access notifications through USER_ID/notifications, it requires the manage_notifications permission.
Graph API Explorer example
If you want to get all recent notifications including read notifications via Graph API, call:
graph.facebook.com/USER_ID/notifications?include_read=true
This can be useful for testing purposes.
As of Aug 1 2010, there are still no methods for notifications in the new Graph API (I'm not sure if there are any plans for migrating that). You need to use the old REST API for that.
Use FB.api in place of old REST API. It could be something like this:
FB.api(
{
method: 'notifications.get'
},
function(response) {
alert("Number of unread messages: " + response.messages.unread);
}
);
Update: It is no longer possible to read the user notifications.
https://developers.facebook.com/docs/graph-api/reference/user/notifications/