How Social Media Affects Elections