US technology stocks fell on Wednesday as senior executives from Facebook and Twitter were grilled by senators on Capitol Hill over Russian interference in the 2016 US elections.

US politicians hinted that stronger regulation may be on the way as Facebook chief operating officer Sheryl Sandberg and Twitter founder Jack Dorsey appeared before the Senate intelligence and the House Energy and Commerce committees.

“Congress is going to have to take action here,” warned Senator Mark Warner, the top Democrat on the intelligence committee, as the hearing opened. “The era of the wild west in social media is coming to an end.”

Ms Sandberg admitted that Facebook had been too slow in recognising Russian efforts to interfere in the election. “We were too slow to spot this and too slow to act. That’s on us. This interference was completely unacceptable,” she said. But she insisted the company was acting to address the problem.

“We’ve removed hundreds of pages and accounts involved in co-ordinated inauthentic behaviour – meaning they misled others about who they were and what they were doing,” she said. “When bad actors try to use our site, we will block them.”

Mr Dorsey told senators he was live-tweeting his remarks and said Twitter had been “unprepared and ill-equipped” to deal with the exploitation of free exchange. “We aren’t proud of how that free and open exchange has been weaponised and used to distract and divide people and our nation,” he said.

Questioned by senators, he admitted that Twitter needed to improve how it detected fake accounts. He said the social media platform was considering labelling “bots” – software that automatically creates tweets without human oversight. “It’s really a question of implementation. We are interested in it and we are going to do something along those lines.”

US tech giants have come under pressure from Congress and consumers over the past 18 months after revelations that the platforms were used by Russian operatives and others to influence the outcome of the US presidential election. Google chief executive Larry Page declined an invitation to appear before the committee, an absence that was raised by several of the senators during the hearing.

US president Donald Trump last week hit out at tech companies, accusing Google of prioritising negative stories about the president in its search engine.

“Google and Facebook and Twitter ... treat conservatives and Republicans very unfairly,” he said last week. “I think it’s a very serious problem because they’re really trying to silence a very large part of this country, and those people don’t want to be silenced. It’s not right. It’s not fair. It may not be legal, but we’ll see. We want fairness.”

Trump attacks Woodward

“Isn’t it a shame that someone can write an article or book, totally make up stories and form a picture of a person that is literally the exact opposite of the fact, and get away with it without retribution or cost. Don’t know why Washington politicians don’t change libel laws?” the president posted on Twitter.

Later in the Oval Office he denounced the book as a “work of fiction”. Responding to questions from reporters as he met with the Emir of Kuwait, Mr Trump said: “The book means nothing. It’s a work of fiction”, noting that Gen James Mattis and chief of staff John Kelly had been “insulted” by the remarks attributed to them.

He said that Mr Woodward had “the same problem with other presidents. He likes to get publicity, sell some books.”

He also denied on Twitter that he had called attorney general Jeff Sessions “mentally retarded” and “a dumb southerner”, as reported in the book. “I said NEITHER, never used those terms on anyone, including Jeff, and being a southerner is a GREAT thing,” the president wrote.