Graph API Version

Notification /{notification-id}

An individual unread Facebook notification. This is an API that's only available for Pages.

Reading

Only unread notifications can be viewed, once read, the notification object will no longer exist and cannot be requested.

Graph API Explorer
GET /v2.10/{notification-id} HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{notification-id}'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{notification-id}",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{notification-id}",
    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:@"/{notification-id}"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • A Page access token is required.

Fields

Property NameDescriptionType

id

The notification's id.

string

from

The entity (user, page, app, etc.) that 'sent', or is the source of the notification.

User|Page|App

to

The entity that received the notification.

User

created_time

When the notification was created.

datetime

updated_time

When the notification was last updated.

datetime

title

The message text in the notification.

string

link

The URL that clicking on the notification would take someone.

string

application

The app responsible for generating the notification. Some of the core Facebook features have their own app that shows up here, such as likes when someone likes another person's content.

App

unread

Indicates that the notification is unread. Note that 'read' notifications will not be accessible.

int

object

The object (this can be a post, a photo, a comment, etc.) that was the subject of the notification.

Object

Publishing

You can't publish using this edge.

Deleting

You can't delete using this edge.

Updating

You can't update using this edge.