查询网络中的所有朋友 [英] Query all friends in a network

查看:116
本文介绍了查询网络中的所有朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法检索特定网络中的所有朋友?例如,如何查看我的Facebook朋友的列表加入我的组织网络。

解决方案

您可以写一个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屋!

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