This document refers to an outdated version of Graph API. Please use the latest version.
Graph API Version

Group

A Group.

As of April 4, 2018, this node and its edges return empty data sets for GET operations unless the calling app has gone through App Review. Please see the Groups API section of the Breaking Changes changelog for more information.

Reading

Returns information about a single Group object. To get a list of Groups a User administers, use the /user/groups edge instead.

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

Permissions

For Public and Closed Groups

A User access token.

For Secret Groups

A User access token for an Admin of the Group with the following permissions:

  • user_managed_groups

Notes

  • Fields that return User information will not be included in any responses unless the request is made using an access token of an Admin of the Group.
  • An app granted the user_managed_groups permission can continue performing reading operations even if the User is no longer an Admin of the Group, although the User can remove the app from the Group manually.

Fields

Property Name Description Type

id

The group ID

string

cover

Information about the group's cover photo.

CoverPhoto

id

ID of the Photo that represents this cover photo.

string

source

URL to the Photo that represents this cover photo.

string

offset_y

The vertical offset in pixels of the photo from the bottom.

int

offset_x

The horizontal offset in pixels of the photo from the left.

int

description

A brief description of the group.

string

email

The email address to upload content to the group. Only current members of the group can use this.

string

icon

The URL for the group's icon.

string

member_request_count

The number of pending member requests. Requires an access token of an Admin of the Group.

int

name

The name of the group.

string

owner

This field was deprecated on April 4th, 2018.

User | Page

parent

The parent of this group, if it exists.

Group | Page

privacy

The privacy setting of the Group. Possible values are CLOSED, OPEN, and SECRET. Requires an access token of an Admin of the Group.

string

updated_time

The last time the Group was updated (includes changes Group properties, Posts, and Comments). Requires an access token of an Admin of the Group.

datetime

Creating

This operation is not supported.

Updating

This operation is not supported.

Deleting

This operation is not supported.

Edges

Name Description

/admins

This edge was deprecated on April 4th, 2018.

/albums

Photo albums owned by the Group.

/docs

Documents owned by the Group.

/events

Events owned by the Group.

/feed

Feed of Posts owned by the Group.

/files

Files owned by the Group.

/live_videos

Live Videos owned by the Group.

/members

This edge was deprecated on April 4th, 2018.

/photos

Photos owned by the Group.

/videos

Videos owned by the Group.