The social media network has accepted the billionaire’s all-cash offer to buy the company and take it private.