When you divorce, you divide all of the property you and your spouse accumulated during the marriage. Your social media accounts are considered property and should be divided in your divorce. If you opened a social media account during your marriage, it's marital property. Any posts, photos, or content you added to a pre-existing account is also marital property. Because of this, you will want to be sure that your divorce decree gives you ownership of all of your social media accounts and content in them.
Social media can also be involved if you or your ex are using it to publicly denigrate each other. Posting negative things about an ex in a public forum will merely inflame your divorce. Because of this, you may want to ask for or agree to a clause that neither of you will denigrate each other on social media during the divorce. If there is a problem and it persists after the divorce, the order can be extended. If you are concerned that your ex is going overboard using social media to post photos or details about your children, you can ask that the order prohibit him or her from doing this as well. Overexposure of children on social media is likely not to be in their best interests.
Facebook now allows you to create legacy settings, naming a person who will be in charge of your account after your death. Most people who set this up select their spouse as their legacy. Just as you change your will after your divorce, you should change your Facebook legacy person.
Including social media in your divorce will fully protect all of your interests.