Start a new topic

list of all "friends" with the app

I am building an app with facebook login. I want to retrieve all the friends of this specific users that also has the app. Meaning - I want to upload list of facebook token Ids from the client and get list of these users that exists in my backend user list.

I was looking at user.lookup but it is not enough. Should I do it through "Business Logic" ? How?



Thanks ahead!
1 Comment

You can use collectionAccess within Business Logic to access the user collection, which contains the facebook subdocument, similar to the following:



modules.collectionAccess.collection('user').find({"_socialIdentity" : { "facebook": {$exists: true}}}, function(err, result) {

// callback code here

});



Login or Signup to post a comment