Added parametrized query for friendships between user's friends and a given subset of user's friends.