Updated

Facebook said Friday it discovered a security breach that affects nearly 50 million user accounts. The issue was found by its engineering team on Tuesday afternoon.

"We’re taking this incredibly seriously and wanted to let everyone know what’s happened and the immediate action we’ve taken to protect people’s security," the company said in a statement.

The company says hackers exploited the "View As" feature on the service. Facebook says it has taken steps to fix the security problem and alerted law enforcement.

"Our investigation is still in its early stages. But it’s clear that attackers exploited a vulnerability in Facebook’s code that impacted 'View As,' a feature that lets people see what their own profile looks like to someone else. This allowed them to steal Facebook access tokens which they could then use to take over people’s accounts. Access tokens are the equivalent of digital keys that keep people logged in to Facebook so they don’t need to re-enter their password every time they use the app."

FACEBOOK ACCUSED OF GENDER BIAS IN ADS

The Menlo Park, Calf.-based Facebook said it is taking three steps to ensure its users accounts are safe: 1. Fixing the vulnerability and informing law enforcement; 2. Resetting "the access tokens of the almost 50 million accounts we know were affected to protect their security"; 3. Temporarily turning off the “View As” feature "while we conduct a thorough security review."

In addition, the Mark Zuckerberg-led company said it is taking the precautionary measure of resetting access tokens for another 40 million accounts that were "subject to a 'View As' look-up in the last year," bringing the total to 90 million accounts who will now have to log back into the service.

Zuckerberg also alerted the breach on his Facebook page.

On the conference call, Guy Rosen, VP of Product Management and the author of the aforementioned statement, said that the company is working with the FBI and said they update law enforcement "when we learn about these interactions."  Facebook also said that it contacted the Irish Data Protection Commission about the breach.

EU COPYRIGHT LAW MAY FORCE GOOGLE, FACEBOOK TO PAY BILLIONS TO MUSIC COMPANIES, PUBLISHERS

Neither passwords or credit card information were taken, Rosen said. Data that could have been taken included information that could be found using the "standard profile retrievable API," which includes data like gender, name or hometown, he said.

Zuckerberg followed that up by saying the company is "taking it really seriously," but that he is "glad that we found this and we're able to the secure accounts."

Rosen would not confirm whether the breach was state-backed, but added the hackers "did need a certain level in order for attacker not only get access but to pivot on the access tokens." Several Facebook users (including the author of this story) noticed the odd occurrence this morning and posted to social media wondering what happened.

Matt Schulz, Chief Industry Analyst at CompareCards, said the breach is another reminder to keep accounts secure.

“This breach can be yet another wake-up call for people to take their online security seriously," Schulz said in comments obtained by Fox News. "We think nothing of visiting Facebook and Instagram 10 times a day, but we feel like we don’t have enough time to take basic safety steps for our online identity.”

ZUCKERBERG OUTLINES FACEBOOK'S STRATEGY TO FIGHT ELECTION MEDDLING

The news comes just days after a hacker said he was going to delete Zuckerberg's Facebook page on Sunday.

Noted Taiwanese hacker Chang Chi-yuan promised to delete Zuckerberg's account, telling his 26,000 followers that the event would be livestreamed on Facebook Live, according to The Verge.

Chang said the event would happen at Sunday at 6 p.m. local time or 6 AM EST/ 3 AM PST.

Facebook has suffered two data breaches in recent memory, including the Cambridge Analytica scandal, in which some 87 million accounts were compromised.

The Cambridge Analytica scandal caused Zuckerberg to appear before Congress, led to a drop in trust in the company amongst its users and ultimately led Zuckerberg to apologize.

Fox News' Gillian Turner and the Associated Press contributed to this report. Follow Chris Ciaccia on Twitter @Chris_Ciaccia