Graph API Version

/{event-id}/feed

The feed of posts including status updates and links published to this Event's wall.

Reading

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

Permissions

Different permissions rules apply depending on the actor and event type such as User event, Page event, Group event).

User Events

  • A user access token is required for public events.
  • A user access token with user_events permission is required for all other events.

Page Events

  • Any user, page or app access token if the Page is published.
  • Page access token if the page is not published.

Group Events

  • A user access token with user_managed_groups permission is required.

Events may not be visible due to privacy, age restrictions, or geographic restrictions.

Notes

  • The since and until params apply on the updated_time field.

Fields

An array of Post objects.

Publishing

POST /v2.11/{event-id}/feed HTTP/1.1
Host: graph.facebook.com

message=This+is+a+test+message
/* PHP SDK v5.0.0 */
/* make the API call */
try {
  // Returns a `Facebook\FacebookResponse` object
  $response = $fb->post(
    '/{event-id}/feed',
    array (
      'message' => 'This is a test message',
    ),
    '{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(
    "/{event-id}/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(),
    "/{event-id}/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:@"/{event-id}/feed"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Different permissions rules apply depending on the actor and event type (User event, Page event, Group event).

User to User/Page Events

  • A user access token for someone able to post to the event is required. For public events, the token must be granted publish_actions permission. For all other events, both publish_actions and user_events permission must be granted.
  • The user must have RSVP'd to the event as attending or maybe in order to be able to publish a post. Those who have RSVP status of noreply or declined cannot post.

Page to Page Events

  • A page access token, for someone able to post to the page, with publish_pages is required.

User to Group Events

  • A user access token, for someone able to post to the group, with publish_actions and user_managed_groups permission is required.

Fields

NameDescriptionType

message

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

string

link

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

string

Response

If successful, you will receive a response with the following information. In addition, this endpoint supports read-after-write and can immediately return any fields returned by read operations.

NameDescriptionType

id

The newly created post ID

string

Deprecated Fields

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.

NameDescriptionType

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.