NBC
NBC

Reputation: 1698

Facebook API - get group members

I want to get a list of members from a public group using Facebook's Graph API

Public group: https://www.facebook.com/groups/1555326074717022

I go here and generated a user access token: https://developers.facebook.com/tools/explorer

I entered this into the GET query:

1555326074717022/members

But I get error

"message": "Unsupported get request. Object with ID '1555326074717022' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",

Not sure what I'm doing wrong - is it even possible to get public group data if you're not an admin?

Upvotes: 1

Views: 3915

Answers (2)

Nexus7_2012
Nexus7_2012

Reputation: 764

https://developers.facebook.com/docs/graph-api/reference/user/groups for Graph API Version v3.1 appears to indicate a solution is possible if the App has gone through App review or if the App is in Development.

https://developers.facebook.com/docs/graph-api/reference/v3.1/group indicates another possibilty with the permissions:

groups_access_member_info — Enables your app to receive member-related data on group content.
publish_to_group — Enables your app to post content into a group on behalf of a user.
user_managed_groups — Enables your app to read the Groups of which a person is an admin.

With that said however, The user_managed_groups permission is not in the list of permissions which can be requested and even in Development mode with a Test App I am getting an error message:

  English Quiz - Test1
Ethan 100029439245680

==== Query
  curl -i -X GET \
   "https://graph.facebook.com/v3.1/100029439245680/groups?access_token=<access token sanitized>"
==== Access Token Info

    {
    "perms": [
      "user_friends",
      "groups_access_member_info",
      "public_profile",
      "basic_info"
    ],
    "user_id": 322852501618049,
    "app_id": 867918616743637
  }
==== Parameters
- Query Parameters


  {}
- POST Parameters


  {}
==== Response
  {
    "error": {
      "message": "Unsupported get request. Object with ID '100029439245680' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
      "type": "GraphMethodException",
      "code": 100,
      "error_subcode": 33,
      "fbtrace_id": "EvrL0yxzs/q"
    },
    "__debug__": {}
  }

Upvotes: 0

andyrandy
andyrandy

Reputation: 74004

https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes

Testing of our more robust process starts today and the new process should resume in a few weeks, but apps currently accessing Events and Groups APIs will lose access today.

Also:

Deprecated: /members and /admins endpoints have been removed.

Upvotes: 1

Related Questions