Freedom of speech protects you from governmental penalty. You were not jailed.

Freedom of speech does not protect you from consequences of what you say. It is 100% legal for your boss to hold you accountable for what you posted on facebook.