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.
A:
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!
mattbasta
2010-03-21 15:16:22