Graph API Version

/{group-id}/feed

The feed of posts including status updates and links published to this group.

Reading

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

Permissions

For public Groups:

  • Any valid access token.
  • An app access token can read posts it published in app and game groups that belong to it.

For closed and secret Groups:

  • A Group admin's User access token with the user_managed_groups permission.
  • An app access token can read posts it published in app and game groups that belong to it.

Notes

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

Fields

An array of Post objects.

Publishing

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

Permissions

For public Groups:

  • A User access token with the publish_actions permission.

For closed and secret Groups:

  • A Group admin's User access token with the publish_actions and user_managed_groups permissions.

Notes

Policy: When posting to an app and game group on behalf of the user, there must be explicit messaging in the UI which communicates that user's content can be accessed by members of the group and is not restricted by their app privacy level. See the app and game group docs for more details.

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.