Hackers gained access to 50 million Facebook accounts, the social media giant has admited. 

A major breach of user data exploited the "view as" feature on the service to access accounts.

Facebook say it has taken steps to fix the issue and are working with police after the breach.

It is unclear whether any data was taken and whether any accounts had been missued. 

Facebook's vice president of product management Guy Rosen said: "On the afternoon of Tuesday, September 25, our engineering team discovered a security issue affecting almost 50 million accounts.

"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.

"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."