Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i get user notifications with the new Graph API

Tags:

facebook

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 sure its related to getting the user notifications ) that suppose to return me callback . but im my case i like to invoke simple http command and get the user notification like ( like the old notification api's ) how can i do it now ? Thanks

like image 446
user63898 Avatar asked Apr 26 '10 09:04

user63898


People also ask

What is notification API?

The Notifications API lets a web page or app send notifications that are displayed outside the page at the system level; this lets web apps send information to a user even if the application is idle or in the background. This article looks at the basics of using this API in your own apps.

Is Graph API a REST API?

The core difference between GraphQL and REST APIs is that GraphQL is a specification, a query language, while REST is an architectural concept for network-based software. Note: This article is mostly server-side related. GraphQL is gaining momentum as a successor to REST APIs.

What is the purpose of the clientState property when creating a new change notification subscription?

Although clientState is not required, you must include it to comply with our recommended change notification handling process. Setting this property will allow you to confirm that change notifications you receive originate from the Microsoft Graph service.


3 Answers

Update: It is no longer possible to read the user notifications.

https://developers.facebook.com/docs/graph-api/reference/user/notifications/

like image 71
andyrandy Avatar answered Sep 23 '22 03:09

andyrandy


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.

like image 23
onosendai Avatar answered Sep 22 '22 03:09

onosendai


A GraphAPI-way: you can access notifications through USER_ID/notifications, it requires the manage_notifications permission.

Graph API Explorer example

like image 35
piotrp Avatar answered Sep 23 '22 03:09

piotrp