Cook County State’s Attorney Kim Foxx filed a lawsuit Monday against Facebook that paints the world’s foremost social media company as the farmer who failed to protect the public against the wolf in sheep’s clothing.

The wolf, in this case, is Cambridge Analytica — the British political consulting firm accused of harvesting user information to tailor make ads on behalf of the campaign of Donald Trump in an effort to influence the 2016 presidential election.

Cambridge Analytica is also named in the suit, which was filed in Cook County on behalf of “the people of the state of Illinois.”

It alleges Cambridge Analytica posed as an academic researcher in a successful effort to create a personality quiz app that was installed by about 270,000 Facebook users in return for $1 to $2.

The company collected the data, as well as data from their Facebook friends — as many as 50 million of them, the suit alleges.

FTC is investigating Facebook over privacy practices
Facebook questioned about pulling Android call, text data
Facebook ads apologize for Cambridge Analytica scandal
Breaking up with Facebook? It’s harder than it looks

“Cambridge Analytic deliberately misled Facebook users so it could build psychological profiles of the user and their friends, and Facebook did not stop it,” Foxx said in an emailed statement. “This blatant deception
violated Illinois law and more importantly violated the privacy of Illinois residents. Cambridge Analytica and Facebook must be held accountable for their actions.”

The suit further alleges that Facebook engaged in deceptive practices touting strict data protection policies while at the same time allowing app developers, including Cambridge Analytica, to accumulate and mine data vastly in excess of those policies.

The suit seeks fines as well as “civil penalties and all appropriate injunctive relief to address, remedy, and prevent harm to Illinois residents resulting from Defendants’ misconduct.”

Foxx alleges Facebook and Cambridge Analytica violated the Illinois Consumer Fraud and Deceptive Business Practices Act.

Attorneys under Foxx will not be working on the case. Foxx is farming the work out to the private law firm of Edelson PC, whose fees will be paid from any recovery generated by this lawsuit.

It’s not clear exactly what safeguards the top prosecutor hopes result from the suit. A Foxx spokeswoman referred questions to Edelson. A message to the law firm was not immediately returned Monday.

Foxx’s action may be the most forceful, but she was not the only local official to take action against Facebook on Monday.

Attorney General Lisa Madigan, along with 36 other attorneys general, signed a letter demanding answers from Facebook CEO Mark Zuckerberg about the company’s business practices and privacy protections, her office announced Monday.

“Facebook must provide detailed information about how it uses the vast amount of data it collects, how it protects that data and what steps it takes to maintain privacy of users’ data,” Madigan said in an emailed statement.

Two private citizens also joined the Facebook pile on.

Last week two west suburban men filed a federal lawsuit against Facebook and Cambridge Analytica claiming they were targeted by political ads that were fashioned from improperly harvested private user data.

Brendan Michael Carr and Victor James Comforte II are seeking unspecified financial damages as well as safeguards that would prevent any future misuse of Facebook data.

Lombard-based attorney James Vlahakis, who’s representing the two men, is seeking to have the lawsuit certified as a class action.

“My clients are longtime Facebook users who were taken aback by the amount of political messaging on Facebook,” Vlahakis said.

“They were impacted by it. It did not change their vote. But they’re concerned it may have changed the votes of other people,” he said.

Messages sent to Facebook and Cambridge Analytica were not  returned.