Graph API Version

/{user-id}/feed

The feed of posts (including status updates) and links published by this person, or by others on this person's profile. There are other edges which provide filtered versions of this edge:

  • /{user-id}/posts shows only the posts that were published by this person.
  • /{user-id}/tagged shows only the posts that this person was tagged in.

All of these derivative edges share the exact same reading structure, however /feed should be used for all publishing purposes.

Related Guides

Reading

Graph API Explorer
GET /v3.2/me/feed 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(
    '/me/feed',
    '{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(
    "/me/feed",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/feed",
    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:@"/me/feed"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • Your app needs user_posts permission from the person who created the post or the person tagged in the post. Then your app can read:
    • Timeline posts from the person who gave you the permission.
    • The posts that other people made on that person Timeline.
    • The posts that other people have tagged that person in.
  • If you attempt to read data from a feed that your app has not been authorized to access, the call will return an empty array.
  • Even with the user_posts permission, it is possible that your app may not be able to read all of a person's posts, or posts that a person is tagged in. Your app's ability to see a specific post must pass several privacy checks, including a person's platform privacy settings.

Modifiers

Name Description Type

with

Restrict the list of posts to only those with location attached.

enum{'location'}

GET /v3.2/me/feed?with=location 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(
    '/me/feed',
    '{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(
    "/me/feed",
    {
        "with": "location"
    },
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
Bundle params = new Bundle();
params.putString("with", "location");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/feed",
    params,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"with": @"location",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/me/feed"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Fields

An array of Post objects.

Publishing

This operation is not supported.

Due to the deprecation of the publish_actions permission, you can no longer use the API to publish user posts. Please use Sharing to enable people to post to Facebook from you app.

Deprecated Fields

As of July 17, 2015, the following parameter will not be displayed in the story that gets rendered on Facebook.

Name Description Type

actions

The action links attached to the post. Action links are any other links shown below the feed story beside Like and Comment.

object[]

name

The name or label of the action link.

string

link

The URL of the action link itself.

string

As of April 18, 2017, the following parameters are no longer supported by Graph API versions 2.9 and higher. For versions 2.8 and lower, the parameters will continue working until July 17, 2017.

Name Description Type

link

The link field is still supported, but its sub-fields have been deprecated.

string

picture

Determines the preview image associated with the link.

string

name

Overwrites the title of the link preview.

string

caption

Overwrites the caption under the title in the link preview.

string

description

Overwrites the description in the link preview

string

Deleting

You can't delete using this edge, however you can delete posts using the /{post-id} node.

Updating

You can't update using this edge, however you can update posts using the /{post-id} node.