查询网络中的所有朋友 [英] Query all friends in a network
问题描述
您可以写一个FQL查询如下:
SELECT uid,name FROM user WHERE affiliations.nid =< your network id>
问题是,关联不可索引,因此您需要对 username
, name
或 uid
列(其中那么这个目的就是失败了)。
所以故事的道德原因是,如果你知道用户的ID或能够生成一系列的用户,那么你可以获取这些数据。否则,Facebook会泄露给您。
希望这有帮助!
Is there any way to retrieve all friends in a particular network? For example, How can I view the list of my Facebook friends joined the network of my organization.
You can write an FQL query such as this:
SELECT uid, name FROM user WHERE affiliations.nid = <your network id>
The problem is that affiliations are not indexable, so you would need to have a constraint on either the username
, name
, or uid
column(s) (which kind of defeats the purpose).
So the moral of the story is that if you know the ID of the user or are able to generate a range of users, then you can fetch this data. Otherwise, Facebook pukes on you.
Hope this helps!
这篇关于查询网络中的所有朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!