Social network's boss will meet the EU and explain how the data of users ended up in the hands of a consultancy firm.

Mark Zuckerberg, Facebook chief executive, is set to meet with leaders of the European Parliament to answer questions about how the data of millions of the social network's users ended up in the hands of a political consultancy.

The meeting on Tuesday comes three days before tough new European Union rules on data protection take effect.

Companies will be subject to fines of up to 4 percent of global turnover for breaching them.

Facebook has come under scrutiny from politicians on both sides of the Atlantic after it emerged that Cambridge Analytica, a British political consultancy that worked on US President Donald Trump's campaign, improperly acquired the data of 87 million users, including up to 2.7 million in the EU.

Public hearing

The European Parliament's president confirmed on Monday via Twitter that the hearing will now be streamed live online following complaints that it was originally planned to be behind closed doors.

"I have personally discussed with Facebook CEO Mr. Zuckerberg the possibility of web streaming [the] meeting with him," Antonio Tajani tweeted. "I am glad to announce that he has accepted this new request. Great news for EU citizens."

I have personally discussed with Facebook CEO Mr Zuckerberg the possibilty of webstreaming meeting with him. I am glad to announce that he has accepted this new request. Great news for EU citizens. I thank him for the respect shown towards EP. Meeting tomorrow from 18:15 to 19:30

The parliament had come under fire after it was announced initially that the meeting would be held privately and attended by select members of parliament.

"I will not attend the meeting with Mr Zuckerberg if it's held behind closed doors. It must be a public hearing - why not a Facebook Live?" Guy Verhofstadt, the leader of the liberal ALDE political group, said last week on Twitter.

Another apology

Zuckerberg has apologised for the leak in testimony to the US Congress, but questions remain over how the company's data policies let the leak happen.

He will stress Facebook's commitment to Europe, where it will employ 10,000 people by the end of the year, according to pre-released remarks.

"I believe deeply in what we're doing. And when we address these challenges, I know we'll look back and view helping people connect and giving more people a voice as a positive force here in Europe and around the world," Zuckerberg is expected to say.

He will also apologise for failing "to take a broad enough view" of the company's responsibilities, "whether it's fake news, foreign interference in elections or developers misusing people's information".

Since the Cambridge Analytica scandal, Facebook has suspended 200 apps from its platforms as it investigates third-party apps that have access to large quantities of user data.

Cambridge Analytica and its British parent, SCL Elections Ltd, have declared bankruptcy and closed down.