After the user logs in I need to get his friends list (IDs only), check if any of them is a user of my app (through a registry on a database), update the list by adding a flag to every user that is also an app user and then do stuff with the updated list.