Facebook founder Mark Zuckerberg has agreed to testify before Congress "if it's the right thing to do" after apologising for “mistakes” the social media giant made in the Cambridge Analytica data-harvesting scandal.

Zuckerberg had come under increasing pressure to speak out as Facebook lost $60 billion in value in just five days.

The shares have now recovered slightly: the company’s value stands around $493bn, down $44bn from Friday’s valuation of $538bn before the scandal hit.

He broke the silence with a Facebook post in which he acknowledged that the firm had known since 2015 that researcher Aleksandr Kogan had shared user data he gathered illicitly from a Facebook app with UK data firm Cambridge Analytica, which is accused of influencing the US election with micro-targeted content.

“We have a responsibility to protect your data, and if we can't then we don't deserve to serve you. I've been working to understand exactly what happened and how to make sure this doesn't happen again,” Zuckerberg wrote.

“The good news is that the most important actions to prevent this from happening again today we have already taken years ago. But we also made mistakes, there's more to do, and we need to step up and do it.”

READ MORE: Female-only GirlCrew.com takes on social media giants

Kogan developed a Facebook app which featured a personality quiz called ‘thisisyourdigitallife’ and Cambridge Analytica paid people to take it.

As well as the quiz results and the user’s Facebook account data, however, it also collected the data of their Facebook friends as well – which is strictly against Facebook’s rules. Full details of the allegations are available here.

Zuckerberg continued: “Last week, we learned from The Guardian, The New York Times and Channel 4 that Cambridge Analytica may not have deleted the data as they had certified [they had to us back in 2015].

“We immediately banned them from using any of our services. Cambridge Analytica claims they have already deleted the data and has agreed to a forensic audit by a firm we hired to confirm this. We're also working with regulators as they investigate what happened.

“This was a breach of trust between Kogan, Cambridge Analytica and Facebook. But it was also a breach of trust between Facebook and the people who share their data with us and expect us to protect it. We need to fix that.”

In a later interview with CNN, he said he would be “happy” to testify before Congress if asked. Last year he sent a deputy to testify on Russian actors seeking to influence the election via Facebook.

“The goal there is to get Congress all the information they need to do their extremely important job and we want to send whoever is best informed,” he said.

Cambridge Analytica has suspended its chief executive Alexander Nix over the data-harvesting scandal while Kogan told the BBC that he has been made a “scapegoat” by the firms.

Enjoy extra content and videos in the interactive digital magazine below

E-edition cover