Nearly 4.6 million residents in Pennsylvania and New Jersey had their Facebook data shared with Cambridge Analytica and other third parties, authorities said Thursday.

Facebook provided the estimates of affected residents — about 3 million in Pennsylvania and 1.6 million in New Jersey — in response to a bipartisan letter filed by 41 state attorneys general, including Pennsylvania's Josh Shapiro and New Jersey's Gurbir S. Grewal.

Cambridge Analytica, a consulting firm linked to President Trump's 2016 election campaignharvested data from an estimated 87 million Facebook users. Facebook CEO Mark Zuckerberg was grilled by senators from both parties last month over the Cambridge scandal and Russia's use of the social media platform to interfere with the 2016 election.

"Social media users don't expect to have their information given to third party developers without their knowledge," Attorney General Josh Shapiro said in a statement Thursday. "Businesses like Facebook must take significant steps to better protect their users' privacy and personal data."

The Cambridge scandal has caused some Philadelphia residents to delete Facebook in hopes of better protecting their data.

Cambridge Analytica announced Wednesday that it was shutting down, blaming "unfairly negative media coverage."

To see if your data was compromised, check here.