Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the list of facebook groups using graph api

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.

like image 592
Muhammad Asim Avatar asked Sep 09 '15 07:09

Muhammad Asim


People also ask

Is Facebook Graph API deprecated?

Graph API Version Deprecations: November 2, 2021: Graph API v4. 0 will be deprecated and removed from the platform. February 3, 2022: Graph API v5. 0 will be deprecated and removed from the platform.

How do I get Facebook Page insights on graph API?

You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.


1 Answers

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

  • https://developers.facebook.com/docs/apps/changelog#v2_4

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.

like image 88
Tobi Avatar answered Nov 09 '22 03:11

Tobi