Graph API Version

Page Notifications

The following endpoint will be deprecated on April 30th, 2019, for version 3.3+ of the Graph API and Marketing API. Apps that have used this endpoint in the last 90 days can continue using them with API versions 3.2 and lower until July 30th, 2019. Apps that have not used this endpoint in the last 90 days will be unable to use it starting on April 30th, 2019.

This edge allows you to get a Page's unread Facebook notifications and create a notification on a Page.

Reading

Returns a Page's unread notifications.

Graph API Explorer
GET /v3.3/{page-id}/notifications HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->get(
    '/{page-id}/notifications',
    '{access-token}'
  );
} catch(Facebook\Exceptions\FacebookResponseException $e) {
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}
$graphNode = $response->getGraphNode();
/* handle the result */
/* make the API call */
FB.api(
    "/{page-id}/notifications",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{page-id}/notifications",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{page-id}/notifications"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Requirements

Response

An array of Notification objects.

Sample Response

{
  "data": [],
  "paging": {}
}

Creating

This operation is not supported.

Updating

This operation is not supported.

Deleting

This operation is not supported.