The scanning “is a mechanism for Facebook to surreptitiously gather data in an effort to improve its marketing algorithms and increase its ability to profit from data about Facebook users,” Michael Sobol, an attorney for the plaintiffs, wrote in the Dec. 30 complaint.