As can be seen in this article, issues of Facebook and Twitter and what employees can and cannot say on those platforms is a very contentious and unsettled legal area at this point. There are many companies that have fired people for what they have said on social media outlets. However, there appears to be an inclination on the part of the government to reduce companies’ ability to fire people for these reasons. However, as is shown by the last line of the article, there is considerable gray area. That means that this answer is only a very general outline of what is presumably legal and illegal.
The basic idea that the government appears to be going by today is that workers must be allowed to post things on social media that seem to be connected to efforts to reform their workplace. What this means is that employers are not supposed to be able to fire workers for (as an example) bringing up issues that workers have with their employers and for inviting coworkers to discuss those issues. Companies may not like this because it tends to make them look bad, but they are supposed to allow it.
On the other hand, workers are not protected if their speech is deemed to be mere “venting.” In other words, if a worker is just expressing anger over some aspect of their work, they can be disciplined or fired. From this we can see the problem with trying to really pin down what is and is not permissible. There can be a great deal of gray area concerning what constitutes venting and what constitutes an attempt at reform.