7

Is is possible to list the members of a Facebook group using the Facebook API? If yes, how?

jww
  • 97,681
  • 90
  • 411
  • 885
Sai Charan
  • 260
  • 1
  • 2
  • 12

5 Answers5

22

This is no longer possible:

This edge was deprecated on April 4th, 2018, and can no longer be used.

Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
  • 1
    Fallout from the [2018 Facebook databreach and presidential election](https://www.google.com/search?q=facebook+data+breach+presidential+elections) I suppose. – jww Oct 15 '18 at 05:33
12

Yes - use the members connection. Check out the Group reference on the Graph API.

NG.
  • 22,560
  • 5
  • 55
  • 61
  • Should you be the group owner ? Does it work for every group ? – Anton Jun 04 '15 at 12:12
  • I don't think you have to be an admin. It is restricted to public groups or groups that you are a member of. Check out the Permissions section in that link. – NG. Jun 04 '15 at 12:15
  • It will give only 5000 members... any other solution? – Waqas Ali Khan Jan 28 '16 at 13:41
  • @waqasalieee you mean 5000 per call or among all pages? If there's a "next" field in your result, that is the next page of data. – NG. Jan 28 '16 at 14:38
  • 1
    @NG. Is it also possible to retrieve the list of pending member requests and then send them a message? – S.aad May 02 '18 at 05:05
5

First you need an access token. I'd recommend this article:

http://benbiddington.wordpress.com/2010/04/23/facebook-graph-api-getting-access-tokens/

If you want a permanent access token you must ask for the "offline_access" extended permission on getting it.

After that, it's just a matter of issuing a REST API call:

https://graph.facebook.com/[GROUPID]/members?access_token=[ACCESSTOKEN]

and you'll receive a JSON list of all the members of that group. Very handy!

Cristiano Paris
  • 1,786
  • 2
  • 14
  • 21
1
 Request request = new Request(Session.getActiveSession(),
                groupId+"/members", bundle,
                HttpMethod.GET, new Request.Callback() {}
Request.executeBatchAsync(request);
Muhammad Aamir Ali
  • 20,419
  • 10
  • 66
  • 57
0

Check the members link on

http://developers.facebook.com/docs/reference/api/group

If you click on that link it will generate a oauth token for you, then simply substitute the groupid

It will only return 500 members though

Tom
  • 12,591
  • 13
  • 72
  • 112