50 million people's Facebook accounts were hacked this week in a 'security breach'.

Facebook has announced that on Tuesday (September 25) their engineering team discovered a major security issue, affecting millions of users.

A spokesman for Facebook said: "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 has now reset these tokens and alerted those who were affected to hopefully protect them in the future.

Those affected will now be asked to log back into their accounts on any and all devices.

After they have logged back in, people will get a notification at the top of their news feed explaining what happened.

Facebook had now turned off the 'view as' feature while they conduct a thorough security review.

The spokesman continued: "This attack exploited the complex interaction of multiple issues in our code.

"It stemmed from a change we made to our video uploading feature in July 2017, which impacted 'view as'.

"The attackers not only needed to find this vulnerability and use it to get an access token, they then had to pivot from that account to others to steal more tokens."

Facebook is yet to determine if information was stolen from these accounts, as they also do not know who is responsible for this attack.