Does the usage of Facebook and Twitter harm a professor's career? Should they instead protect their tweets and Facebook posts and keep them private / Friends-only in their account settings?

Some profs' tweets / Facebook posts are great and inform the public of their new research, especially stuff in machine learning / data science, while other profs I have seen use much of their tweets and Facebook posts to rant about politics, e.g. rants about Donald Trump.  It seems dangerous for a professor to have all of his political feelings posted publicly on Twitter / Facebook.
Unless someone has done some quantitative or qualitative research, I think this will be very hard to verify either way. There are certainly professors that are famous and have very vocal political opinions, such as Noam Chomsky, and many philosophers. However, it is hard to verify whether: their opinions help their career, their career helps people accept their opinions more readily, or whether their career could have gone even further without their opinions.

One thing to note, however, is that it used to be many philosophers seemed to take it as a duty to give public talks and so on, on politics (e.g., Bertrand Russell), and perhaps other academics did too. So although we probably cannot give an empirical answer right now, it does seem that in many cases social media is merely an extension of professor's work, even if they are giving thoughts on areas they do not research, as thinkers they may have a duty to contribute informed opinions based on their training.