7

I want the list of groups in which I'm member. In the Graph Api Explorer I did not find any permission like user_groups. I select all the "User Data Permissions" and "Extended Permissions" but it did not work.

In graph api explorer I am using this command GET->/v2.4/me/groups. and i get empty JSON data Like this.

{
  "data":[
  ]
}

And if I use the old graph api version 2.2 Like GET->/v2.2/me/groups then I get the groups only in which I am admin not all the groups.

If anyone have this experience and also have any solution please help me to solve my problem.

Machavity
  • 30,841
  • 27
  • 92
  • 100
Muhammad Asim
  • 379
  • 1
  • 4
  • 14
  • Did you find a way around to get the list of all groups that you/users are a member of? – Hieu Jan 17 '16 at 10:38

4 Answers4

7

Short answer: user_groups is deprecated with v2.4, see

the user_groups permission has been deprecated. Developers may continue to use the user_managed_groups permission to access the groups a person is the administrator of. This information is still accessed via the /v2.4/{user_id}/groups edge which is still available in v2.4.

Tobi
  • 31,405
  • 8
  • 58
  • 90
  • 2
    but when i try to access via '/v2.4/{user_id}/groups' edge. it give me blank JSON data. – Muhammad Asim Sep 09 '15 at 07:10
  • 1
    is there any way to access the list of user groups via facebook api's ? – Muhammad Asim Sep 09 '15 at 07:12
  • I'm talking about the Graph API, so I don't understand your second comment. It's gone, and it's all in the docs. – Tobi Sep 09 '15 at 07:36
  • 1
    Thanks for your reply Friend i got it. user_gorups permission is working great in Graph api v2.3. – Muhammad Asim Sep 09 '15 at 07:48
  • actually you need to change the api version first and then re-access the permissions by clicking on get token button then you will fine the user_gorups permission there. – Muhammad Asim Sep 09 '15 at 07:51
  • You can only change the Graph API version if your app supports it. If you'd create an app today, you wouldn't be able to use v2.3, just v2.4 – Tobi Sep 09 '15 at 08:03
  • Thanks for this additional knowledge. i created my app one year ago and now i start developing it. – Muhammad Asim Sep 09 '15 at 14:12
  • Ok, that explains why it works... Have an additional look at https://developers.facebook.com/docs/apps/changelog to see how long v2.3 will live. – Tobi Sep 09 '15 at 14:49
  • i never read these type of information but now because of you i understand it's importance. – Muhammad Asim Sep 09 '15 at 16:06
4

What are you looking for exactly?

  1. The list of all groups that you are a member of?
  2. The list of all groups that you admin?

I am not sure about A but at the time of writing this answer, Graph API v2.5 is the latest version and you can find the list of all the groups where you are the admin by using the admined_groups endpoint. You need the permission user_managed_groups in your Access Token, without the permission you will get empty data.

Here is a link to the endpoint

NewUser
  • 3,729
  • 10
  • 57
  • 79
PirateApp
  • 5,433
  • 4
  • 57
  • 90
  • As of today (April 2019) you can retrieve all Groups you are admin of from the Facebook Graph API by adding the "admin_only" to your query string. Here is the link to the Facebook API documentation: [https://developers.facebook.com/docs/graph-api/reference/user/groups](https://developers.facebook.com/docs/graph-api/reference/user/groups) – msola Apr 27 '19 at 02:30
1

Update 27 Juli 2022

You must have permission called groups_access_member_info for get list group

Azickri
  • 35
  • 5
0

To obtain the list of Facebook groups, you can submit a request to the following endpoint:

https://graph.facebook.com/v5.0/{ID GROUP}?&access_token={ACCESS_TOKEN}
Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574