Graph API Version

User Groups

The Facebook Groups that the person belongs to.

Permissions

You need to ask for the user_managed_groups permission to retrieve any groups that the session user is an admin of.

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 that the person is an admin of

Graph API Explorer
GET /v2.9/{user-id}/groups HTTP/1.1
Host: graph.facebook.com
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'GET',
  '/{user-id}/groups'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* 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
}];

Permissions

Developers usually request these permissions for this endpoint:

Marketing Apps
No data
Page management Apps
  • pages_show_list
  • user_managed_groups
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

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.