Graph API Version

User Groups

A list of Facebook Groups of which a person is an admin.

As of April 4, 2018, this edge returns empty data sets for GET operations unless the calling app has gone through App Review. This applies to GET operations using /me/groups as well. Please see the Groups API section of the Breaking Changes changelog for more information.

Permissions

You need to ask for the user_managed_groups permission to retrieve any groups the session user admins.

Login Review: user_managed_groups

To use the user_managed_groups permission you need to submit your app for review.

Learn more about Login Review

Reading

The Facebook Groups of which the person is an Admin.

Example

Graph API Explorer
GET /v2.12/{user-id}/groups 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(
    '/{user-id}/groups',
    '{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(
    "/{user-id}/groups",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{user-id}/groups",
    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:@"/{user-id}/groups"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
  • manage_pages
  • business_management
  • user_managed_groups
  • user_events
  • user_photos
Page management Apps
  • manage_pages
  • user_managed_groups
  • user_events
  • user_photos
Other Apps
  • user_managed_groups

Parameters

NameDescription
parent
numeric string or integer

Filter to see all children groups of a particular community group, by setting to the community group's ID

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {} }

data

A list of Group nodes.

The following fields will be added to each node that is returned:

FieldDescription
administrator
bool

Shown if this person is an admin of the group.

bookmark_order
unsigned int32

This group's place in the list of bookmarks on this person's Facebook homepage.

unread
unsigned int32

A count of the number of unread posts in that group.

paging

For more details about pagination, see the Graph API guide.

Validation Rules

ErrorDescription
100Invalid parameter
200Permissions error

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.