When you post on Facebook or Twitter, you're publishing content in the public sphere, deliberately. Published ideas are for public consumption and judgement. If you don't want those ideas and opinions to be judged, don't publish them. Talk to your friends and family about them: keep them in the private sphere.
There's a perverse modern idea that you don't have an identity unless it's a public identity. You barely exist unless you're seen to exist in Instagram pictures, Facebook posts, and Tweets. Not only don't you exist unless you build a social media identity, but because identity is sacrosanct, whatever you publish must be accepted without reservation and judgment — because it's just you being you.
That's bullshit. You have a private identity. You don't have to publish your opinions in the public sphere, and if you do everyone has every right to judge those opinions. If you don't want to be judged, keep it private.