How to capture the membership list of a private or secret Facebook group using the GRAPH API?

Asked

Viewed 7,006 times

1

I have a group on Facebook as open and use the following method to return an array with all members of the group:

$group_members = $this->facebook->api("/id_do_grupo/members");

When I change the group to private or secret the array returns empty. I shouldn’t, because I’m a member of the group and obviously I’m authenticated in the app to use the facebook->api.

  • Your app asks for permission user_groups when making the connection?

  • 1

    I wasn’t asking, but I added it, cleared the browsers cache, logged in again, authorized user_groups and keeps displaying an empty array when it’s in a closed group.

1 answer

2

According to my research I got the following answer:

You can access user and friend permissions. There is a specific user_groups permission. Generally the authentication mode as Facebook works is that the authentication user will allow your application or (website) access. So, if a user is a member of a particular group and allows their application to connect through user_groups permission, your application will connect successfully.

English -> https://stackoverflow.com/questions/7399333/get-access-token-for-a-closed-group-on-facebook-graph-api

Doc -> https://developers.facebook.com/docs/facebook-login/permissions

Browser other questions tagged

You are not signed in. Login or sign up in order to post.