Added method to recursively get friends with cursor