Facebook is facing a class-action lawsuit over claims the social network monitors users’ private messages to sell the data to advertisers.