Graph API Version

/{group-id}/admins

The admins of a group. This edge is only available to app and game groups.

Reading

You can't read a list of group admins via the Graph API.

Publishing

Apps can set admins in groups they have created using this edge:

POST /v2.10/{group-id}/admins HTTP/1.1
Host: graph.facebook.com

uid=1234567
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'POST',
  '/{group-id}/admins',
  array (
    'uid' => '1234567',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
Bundle params = new Bundle();
params.putString("uid", "1234567");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{group-id}/admins",
    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 = @{
  @"uid": @"1234567",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{group-id}/admins"
                                      parameters:params
                                      HTTPMethod:@"POST"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Fields

NameDescriptionType

member

The user to make an admin. They must be a member of the group and user of the app. This is required.

string

Response

If successful:

{
  "success": true
}

Otherwise a relevant error message will be returned.

Deleting

Apps can remove admins from groups they have created using this edge:

DELETE /v2.10/{group-id}/admins HTTP/1.1
Host: graph.facebook.com

uid=1234567
/* PHP SDK v5.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $session,
  'DELETE',
  '/{group-id}/admins',
  array (
    'uid' => '1234567',
  )
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
Bundle params = new Bundle();
params.putString("uid", "1234567");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{group-id}/admins",
    params,
    HttpMethod.DELETE,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
NSDictionary *params = @{
  @"uid": @"1234567",
};
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{group-id}/admins"
                                      parameters:params
                                      HTTPMethod:@"DELETE"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];

Permissions

Fields

NameDescriptionType

uid

The admin to remove. This is required.

string

Response

If successful:

{
  "success": true
}

Otherwise a relevant error message will be returned.