Facebook recently made access to the user’s notifications using the Graph API possible. Using the Graph API we should now be able to mark a notification as read.
I used the REST API to mark notifications as read before without any problems and now I would like to use the Graph API instead. I am making the following request:
[facebook requestWithGraphPath:@"notifications" andParams:params andHttpMethod:@"POST" andDelegate:self];
And the params dictionary will look like this:
{
id = xxxxxxxx;
unread = 0;
}
I am getting the following error:
OAuthException: (#3) Application does not have the capability to make this API call.
Does anyone have an idea why I might be getting this error?
The error was happened because I was using the
notification_idwhich FQL returned but it seems that the Graph API returns another type of ID. E.g.notif_xxxxxxxxxx_xxxxxxxxxand the request should look like:[facebook requestWithGraphPath:@"notif_xxxxxxxxxx_xxxxxxxxx" andParams:params andHttpMethod:@"POST" andDelegate:self];With the
paramsdictionary being: