Learning in social networks