“The social network gathers such data by placing lines of code on users’ computers, collecting information on the websites they visit. Facebook also gathers information on which mobile apps its users have downloaded. Until now, the company has said it keeps the data only for security reasons.”