是否可以使用Facebook图形访问Facebook上的朋友用户组?
这是指人们可以列出朋友的子列表(即工作朋友,家人,密友).
By which I mean when people can make sub lists of friends (i.e. work friends, family, close friends).
是否可以访问这些文件,因为我希望我的应用程序允许用户以特定的朋友群为目标来发送消息,而不必手动选择每个人?
Is it possible to access these, as I would like my app to let the user target specific groups of friends to send messages to without having to manually choose each person?
任何搜索"facebook群组","facebook朋友群组"或朋友列表"的信息都会显示有关如何访问主要朋友列表的信息-我已经可以这样做.
Any searches for 'facebook groups', 'facebook friends groups' or 'friends list' turns up info on how to access the main friends list - which I can already do.
以前有没有人设法做到这一点?一方面,我认为可能由于隐私问题而被禁止,另一方面,我认为Facebook希望用户可以向应用程序中的朋友群发送消息.
Has anyone managed to do this before? On the one hand I think it could be prohibited due to privacy issues, on the other hand I would think Facebook would prefer that users could message groups of friends in apps.
您肯定可以得到此数据.有一个特定的许可称为user_friendlists
.您必须请求用户的许可,一旦获得许可,您要做的就是查询此Graph端点-
You can most certainly get at this data. There is a specific permission called user_friendlists
. You'll have to request that permission from your users and once you have it, all you have to do is query this Graph end point -
https://graph.facebook.com/USER_ID/friendlists
它将返回与此类似的数据-
It'll return data similar to this -
{
"data": [
{
"id": "XXX",
"name": "Close Friends",
"list_type": "close_friends"
},
{
"id": "YYY",
"name": "♥",
"list_type": "user_created"
},
{
"id": "ZZZ",
"name": "Offline",
"list_type": "user_created"
},
{
"id": "AAA",
"name": "The Office",
"list_type": "work"
},
{
"id": "BBB",
"name": "Acquaintances",
"list_type": "acquaintances"
},
...
如您所见,这里有两种类型的朋友列表.自动生成的,例如
As you can see, there are both types of friend lists here. Automatically generated ones such as
- 亲密朋友
- 熟人
以及我手动创建的一些自定义标签-
And some custom ones that I manually created -
- ♥
- 离线
- 办公室
要获取这些列表中列出的实际朋友,请使用/members
终点.
To get at the actual friends listed within these lists, you use the /members
end point.
https://graph.facebook.com/USER_ID/FRIENDLIST_ID/members
这只是 read 权限,您将需要其他manage_friendlists
才能创建/编辑这些列表.
This is only the read permission, you'll need the additional manage_friendlists
to be able to create/edit those lists.