How social media shapes tolerance and echo chambers