A Facebook Group.
Returns information about a single Group object. To get a list of Groups a User administers, use the /user/groups
edge instead.
GET /v21.0/{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();
/* 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
}];
groups_access_member_info
— Enables your app to receive member-related data on group content.publish_to_groups
— Enables your app to post content into a group on behalf of a user.For Public and Closed Groups
A User access token
For Secret Groups
A User access token for an Admin of the Group
Caveats
Property Name | Description | Type |
---|---|---|
| The Group ID |
|
| Information about the Group's cover photo. |
|
| A brief description of the Group. |
|
| The email address to upload content to the Group. Only current members of the Group can use this. |
|
| The URL for the Group's icon. |
|
| The number of members in the Group. |
|
| The number of pending member requests. Requires an access token of an Admin of the Group.we The count is only returned when the number of pending member requests is over 50. |
|
| The name of the Group. |
|
| Deprecated in v9.0+. Will be deprecated in all versions February 9, 2021. |
|
| The parent of this Group, if it exists. |
|
| The permissions a User has granted for an app installed in the Group. |
|
| The privacy setting of the Group. Possible values are |
|
| The last time the Group was updated (includes changes Group properties, Posts, and Comments). Requires an access token of an Admin of the Group. |
|
This operation is not supported.
This operation is not supported.
This operation is not supported.
Name | Description |
---|---|
This edge was deprecated on April 4th, 2018. | |
Photo albums owned by the Group. | |
Documents owned by the Group. | |
Events owned by the Group. | |
Feed of Posts owned by the Group. | |
Files owned by the Group. | |
Live Videos owned by the Group. | |
This edge was deprecated on April 4th, 2018. | |
Photos owned by the Group. | |
Videos owned by the Group. |