I don't agree with this. There should be laws that protects employees from vexatious clauses in their contracs.
I also think that companies shouldn't interfere with their employess *private* life and social interactions.
This as a general rule.
But of course, if - for example - your twitter account lists your employer, and you reveal yourself as their employee and talk about your work there... then you have a duty to protect their business and not to be an idiot. And they have all the reason to fire you if you're damaging them through your social interactions.
I think that's a reasonable solution and I definitely agree with the last part. If you're going to use your workplace as a vehicle to gain more followers and publicity on social media, then the company has the right to fire you if you do something that can damage their brand.