Graph API Version

Status /{status-id}

A status message in a profile's feed.

Warning: You can't get a valid status ID from users' post URLs or their timelines. You need to call the Graph API (e.g. via /user/feed) to get a valid status ID.

Reading

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

Permissions

  • A user access token if the status is public. Note that the user who posted the status needs to use your app.
  • A user access token with read_stream permission for any other statuses.

Fields

NameDescriptionType

id

The status message ID.

string.

event

Event associated with this status, if any.

Event

from

The user who posted the message.

Profile

id

The ID of the Profile.

numeric string

name

The name of the Profile, e.g. the Person's full name

string

message

The status message content.

string

place

Location associated with this status, if any.

Page

updated_time

The time the message was published.

datetime

Publishing

You can publish statuses by using the /{user-id}/feed, /{page-id}/feed, /{event-id}/feed, or /{group-id}/feed edges.

Deleting

An app can delete a status if it published it.

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

Important: You cannot directly delete a status using its ID {status-id}. Instead you need to delete the individual post for the status. The post ID is defined as: {from.id}_{status-id}

Permissions

  • A user access token with publish_actions permission.

Fields

No fields are required.

Response

If successful:

{
  "success": true
}

Otherwise a relevant error message will be returned.

Updating

An app can update a status if it published it:

POST /v2.7/{from.id}_{status-id} HTTP/1.1
Host: graph.facebook.com

message=This+is+a+test+message
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'POST',
  '/{from.id}_{status-id}',
  array (
    'message' => 'This is a test message',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/{from.id}_{status-id}",
    "POST",
    {
        "message": "This is a test message"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("message", "This is a test message");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{from.id}_{status-id}",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"message": @"This is a test message",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{from.id}_{status-id}"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Important: You cannot directly update a status using its ID {status-id}. Instead you need to update the individual post for the status. The post ID is defined as: {from.id}_{status-id}

Permissions

  • A user access token with publish_actions permission.

Fields

You can update the field listed in /{user-id}/feed, /{page-id}/feed, /{event-id}/feed, or /{group-id}/feed.

Response

If successful:

{
  "success": true
}

Otherwise a relevant error message will be returned.

Edges

NameDescription

/likes

People who like this status.

/reactions

People who have reacted to this.

/comments

Comments on this status.

/sharedposts

Shares of this status.