Employers don't just fire you because a Twitter mob told them to. They do it because they learned about your bad behavior and no longer have faith in you.
If you don't like being fired: - Don't do stuff your employers will find distasteful - Vote for candidates to end at-will employment and give stronger employee rights