getNetwork function

Extract network of friends of authenticated user