Facebook Graph Api v2.0+ - /me/groups returns empty

五迷三道 提交于 2019-11-28 11:27:20

问题


I am trying to get my groups with graph api v2.0, but data returns empty:

{
  "data":  []
}

Before this I used v1.0 and this was workable. I use: https://graph.facebook.com/v2.2/252637181559106?fields=id%2cname&access_token=****

Same result I have with https://apigee.com; (https://apigee.com/console/facebook?req=%7B%22resource%22%3A%22getusergroups%22%2C%22params%22%3A%7B%22query%22%3A%7B%7D%2C%22template%22%3A%7B%22user%22%3A%22me%22%7D%2C%22headers%22%3A%7B%7D%2C%22body%22%3A%7B%22attachmentFormat%22%3A%22mime%22%2C%22attachmentContentDisposition%22%3A%22form-data%22%7D%7D%2C%22verb%22%3A%22get%22%7D)

Can anyone help me to receive all my groups?


回答1:


https://developers.facebook.com/docs/facebook-login/permissions/v2.3

user_groups

Enables your app to read the Groups a person is a member of through the groups edge on the User object.

This permission does not allow you to create groups on behalf of a person. It is not possible to create groups via the Graph API.

Review

If your app requests this permission Facebook will have to review how your app uses it.

Limited Use

This permission is granted to apps building a Facebook-branded client on platforms where Facebook is not already available. For example, Android and iOS apps will not be approved for this permission. In addition, Web, Desktop, in-car and TV apps will not be granted this permission.

In short: Facebook will no longer approve user_groups permission for most developers starting from 30 Apr 2015.




回答2:


The group you are mentioning is a closed group. In order to access anything about that group, you need to have the user_groups permission. Facebook's policy is to deny that permission to ANYONE unless they are coding for a platform that does not have a native Facebook app. If you are coding for Android iOS, or Windows Mobile, you are probably out of luck... =(



来源:https://stackoverflow.com/questions/30206743/facebook-graph-api-v2-0-me-groups-returns-empty

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!