facebookfacebook-graph-apifacebook-php-sdkfacebook-group

Facebook Graph API - Group permissions - throws 'invalid scope' error when authorizing


There have been significant changes in Facebook Graph API. Among them, permissions for group have been changed, so now are required 3 new permissions:

groups_access_member_info, publish_to group, user_managed_groups

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.

source: https://developers.facebook.com/docs/graph-api/reference/v3.1/group

These new permissions are sent to authorize Facebook app usage on behalf of the Facebook user, as we used it before, so there is no problem with redirecting to login dialog.

The problem comes when I include these 3 permissions and then instead of login dialog, it is shown error dialog with "invalid scope" error for these permissions.

Previously, when some permissions haven't been approved still, it would throw warning for permissions approval, but it would allow Facebook app developers and admins to test them.


Solution

  • It looks like these permissions are still not available to test, although placed in official Facebook docs.

    It turned out that for accessing groups, and posting to groups permissions

        'publish_to_groups', 'groups_access_member_info'
    

    are good to use.

    Source: https://developers.facebook.com/docs/graph-api/changelog/version3.0/#new-app-review

    In addition to these permissions, Facebook Group admin needs to add the app through edit group settings.

    note

    official source https://developers.facebook.com/docs/apps/review/feature#reference-GROUPS_ACCESS points to publish_to_group permission. Not sure if this is a typo or in the future permission will be changed, but it is currently publish_to_groups