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 /v2.8/me/feed HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/me/feed'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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

NameDescriptionType

with

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

enum{'location'}

GET /v2.8/me/feed?with=location HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/me/feed',
  array (
    'with' => 'location',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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

POST /v2.8/me/feed 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',
  '/me/feed',
  array (
    'message' => 'This is a test message',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
/* make the API call */
FB.api(
    "/me/feed",
    "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(),
    "/me/feed",
    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:@"/me/feed"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

  • A user access token with publish_actions permission can be used to publish new posts.

Fields

NameDescriptionType

message

The main body of the post, otherwise called the status message. Either link, place, or message must be supplied.

string

link

The URL of a link to attach to the post. Either link, place, or message must be supplied. Additional fields associated with link are shown below.

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

place

Page ID of a location associated with this post. Either link, place, or message must be supplied.

string

tags

Comma-separated list of user IDs of people tagged in this post. You cannot specify this field without also specifying a place.

csv[string]

privacy

Determines the privacy settings of the post. If not supplied, this defaults to the privacy level granted to the app in the Login Dialog. This field cannot be used to set a more open privacy setting than the one granted.

object

value

The value of the privacy setting.

enum{'EVERYONE', 'ALL_FRIENDS', 'FRIENDS_OF_FRIENDS', 'CUSTOM', 'SELF'}

allow

When value is CUSTOM, this is a comma-separated list of user IDs and friend list IDs that can see the post. This can also be ALL_FRIENDS or FRIENDS_OF_FRIENDS to include all members of those sets.

string|csv[string]

deny

When value is CUSTOM, this is a comma-separated list of user IDs and friend list IDs that cannot see the post.

string|csv[string]

object_attachment

Facebook ID for an existing picture in the person's photo albums to use as the thumbnail image. They must be the owner of the photo, and the photo cannot be part of a message attachment.

string

Response

If successful:

NameDescriptionType

id

The newly created post ID

string

Deprecated Fields

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

NameDescriptionType

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

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.