是否可以通过图形API获取用户的所有组? [英] Is it possible to get all the groups of a user by graph api?

查看:91
本文介绍了是否可以通过图形API获取用户的所有组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是使用Facebook图形API获取用户加入/喜欢的所有组/页面。我们需要用户的许可才能获取它们吗?我试过这个:

My requirement is to fetch all the groups/ pages that a user has joined/ liked using facebook graph api. Do we need permission of the user to fetch them? I tried this:

https://graph.facebook.com/puzzell/groups?access_token=xxxxxxxxxxxxxxxxxxxx|lGI-q-ooUDPJBryegadsgrfgr5dr

但只有:

{
"data": [

]
}

空数据。
我错过了什么?还是甚至可以抓取它们?
访问令牌由我创建的应用程序生成,其中puzzell是与我的应用程序无关的用户标识。

Empty data. What Am i missing? Or is it even possible to fetch them? The access token is generated by the app created by me where puzzell is the user id who has nothing to do with my app.

请询问您是否需要知道别的什么
谢谢。

Please ask if you need to know anything else. Thank you.

推荐答案

要阅读组,您需要:


  1. 任何有效的access_token(如果该组是公开的)(即组的

    隐私设置为OPEN)

  2. user_groups权限用户的非公开组

  3. friend_groups用户的朋友的非公开组的权限

  4. Apps和游戏的组需要使用App access_token 。

  1. any valid access_token if the group is public (i.e. the group's
    privacy setting is OPEN)
  2. user_groups permission for a user's non-public groups
  3. friends_groups permission for a user's friend's non-public groups
  4. Groups for Apps and Games require the use of an App access_token.




https://graph.facebook.com/me?fields=id,name,groups

您可以使用user_likes或friends_likes权限,通过向/ PROFILE_ID /喜欢发送HTTP GET来读取用户喜欢的页面。例如:

You can read the pages that a User has liked by issuing an HTTP GET to /PROFILE_ID/likes with the user_likes or friends_likes permissions. For example:

https://graph.facebook.com/me/likes  

这篇关于是否可以通过图形API获取用户的所有组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆