I have managed to get a list of new Facebook Notifications
but can't seem to find a way of marking them as read?
I am using FQL
with the PHP SDK
.
Please can someone point me to some documentation with examples.
I have managed to get a list of new Facebook Notifications
but can't seem to find a way of marking them as read?
I am using FQL
with the PHP SDK
.
Please can someone point me to some documentation with examples.
To mark a notification as read, POST to
with param
"unread"=0
.If you've received the notification object via Grapth API, NOTIFICATION_ID equals the id of the notification object.
If you've received the notification object via FQL, you'll have to build NOTIFICATION_ID as follows:
For example if current userId is 123 and notification_id from FQL is 456, NOTIFICATION_ID should be:
and the POST becomes:
with parameter
unread=0
You'll need 'manage_notifications' permission.
To read notifications, you will need to get
manage_notifications
permission from the user. (Presuming you already have that is you can getList).To mark a notification as read you need to use:
notifications.markRead
You can find information on this page.
http://developers.facebook.com/docs/reference/rest/notifications.markRead/
You cannot use straight FQL to mark a notification as read and you can only mark notifications that have been created (as I am led to believe) during the current user session.