I think the most important rules are to be honest and to apologise. To begin with, social media is not the best place to share confidential information, but if that happens admitting your mistake to all involved parties is the best approach. And then apologising and hoping the reciever would keep it confidential. Those are the important rules. But the first step is to try to delete the message, of course.
Some of the social media platforms allow you to delete such classified messages e.g. WhatsApp. In a situtation where you can't delete from the receiver's end you have to hope and pray he does not use it for anything diabolic.