I really try to avoid saying anything unkind on any social media. If I do disagree I keep it focused on me:
“In my experience…” or “I feel this way about that…”
That’s ridiculous, how can you believe that?” or “You should/shouldn’t do X”
I finish with YMMV a lot (Your mileage may vary.)
When apologizing, you needn’t admit you were in the wrong if you weren’t. Say you are sorry you made them upset and that wasn’t what you intended. That makes it more about caring for your friend’s feelings and the social media topic is not the focus.
This was only possible for me after taking meds. Before that, it was easy for me to get my knickers in a twist about things. Right-brainers actively seek out argument and conflict as it gives us dopamine just like pleasant things.
Keep in mind if someone is making you feel bad a lot it’s probably not about you, they are just acting out. If they are just a toxic person, it may be worthwhile to cut them loose.