Since then, the company has scrambled to appease lawmakers by promising to hire more than 1,000 people to manually review political ad purchases and to make the funding of those ads public.
“The foreign interference we saw was reprehensible,” Colin Stretch, Facebook’s general counsel, told senators.
The companies also acknowledged they were struggling to keep up with the threat of foreign interference.
“The abuse of our platform to attempt state-sponsored manipulation of elections is a new challenge for us — and one that we are determined to meet,” Twitter’s acting general counsel, Sean Edgett, said.
At the heart of the companies’ problems are business models that reward viral content — which can include misinformation — and an enormous advertising business that is automated and unable to easily spot ads purchased by foreign governments.
In a sign of the shifting political winds for tech giants, Republicans, who have been more restrained in their criticism of the companies, were more skeptical on Tuesday. In one contentious exchange, Senator John Kennedy, Republican of Louisiana, pressed Mr. Stretch on whether Facebook could possibly police all of its advertisers.
“I’m trying to get us down from La-La Land here,” Mr. Kennedy said. “The truth of the matter is, you have five million advertisers that change every month. Every minute. Probably every second. You don’t have the ability to know who every one of those advertisers is, do you?”
Mr. Stretch acknowledged that Facebook could not track all of those advertisers.
Senator Lindsey Graham, Republican of South Carolina, the chairman of the crime and terrorism subcommittee that held the hearing, said the risk went beyond Russia to other American adversaries. Talking to reporters afterward, he alluded to potential regulation of political advertising online.
“It’s Russia today; it could be Iran and North Korea tomorrow,” he said. “We need to do is sit down and find ways to bring some of the controls we have on over-the-air broadcast to social media to protect the consumer.”
Facebook, Twitter and Google have not publicly opposed a bipartisan proposal to require reports on who funds political ads online, similar to rules for broadcast television. In private, their lobbyists have praised voluntary efforts to disclose political ad funding and have resisted many aspects of the bill.
Senator Amy Klobuchar, Democrat of Minnesota, said the legislation was essential before the midterm elections in 2018.
“Our midterms are 370 days away, and we don’t have time to mess around with dialogue anymore,” Ms. Klobuchar said in an interview after the hearing. Ms. Klobuchar introduced the bill with Senator Mark Warner, Democrat of Virginia, and Senator John McCain, Republican of Arizona.
During the hearing, some Republicans also sought to play down the Russian effort to tip the election in favor of President Trump, stressing incorrectly that the Kremlin’s agents did not favor a particular presidential candidate in last year’s election.
“Russia does not have loyalty to a political party in the United States,” said Senator Charles E. Grassley, the Republican chairman of the Judiciary Committee. “Their goal is to divide us and discredit our democracy.”
That assertion was at odds with the conclusion of American intelligence agencies that President Vladimir V. Putin of Russia tried to sway the election in favor of Mr. Trump, going beyond just posting disruptive content on social media. Russian operatives also hacked Democratic email accounts and released messages embarrassing to Hillary Clinton’s campaign.
Mr. Graham asked Mr. Stretch, Facebook’s general counsel, to confirm that the pattern of activity Facebook saw from Russia was more focused on sowing chaos in the United States than in bolstering Mr. Trump’s candidacy.
“During the election, they were trying to create discord between Americans, most of it directed against Clinton,” Mr. Graham said, addressing Mr. Stretch. “After the election, you saw Russian-tied groups and organizations trying to undermine President Trump’s legitimacy. Is that what you saw on Facebook?”
Mr. Stretch agreed. But the question was narrowly tailored, apparently intended to distance the broader Russian interference from the backing of Mr. Trump.
Though the companies made promises to work with government officials, Mr. Stretch stopped short of agreeing to some suggestions.
In one heated exchange, Senator Al Franken, Democrat of Minnesota, asked him to reject political ad purchases in foreign currencies.
“How did Facebook, which prides itself on being able to process billions of data points and instantly transform them in the personal connections with its user, somehow not make the connection that electoral ads, paid for in rubles, were coming from Russia?” Mr. Franken said.
But Mr. Stretch hemmed, saying the rejection of a foreign currency to buy political ads would not solve the problem of foreign interference.
“The reason I’m hesitating on foreign currency is it’s relatively easy for bad actors to switch currencies,” Mr. Stretch said. “So it’s a signal, but not enough.”
That response failed to satisfy Mr. Franken, who interrupted with exasperation.
“My goal is for you to think through this stuff a little bit better,” Mr. Franken said, raising his voice.
This week, the companies admitted that the abuse of their platforms was much greater than previously acknowledged. In addition to Facebook’s admission, Google said that agents who were also from the Kremlin-linked Internet Research Agency uploaded more than 1,000 videos on its YouTube platform. Twitter said the Russian agency published more 131,000 messages on Twitter.
On Wednesday, the top lawyers for all three companies will appear before the House and Senate intelligence committees, which are conducting their own investigations into the Russian election meddling.
Tuesday’s hearing exposed a much deeper struggle for Facebook, which is trying to tread a delicate line as a technology platform while also fighting against hate speech, violence and misinformation on its site.
“I like that they are contrite, but these issues are existential they aren’t taking any structural changes,” said Tim Wu, a professor of law at Columbia University. “These are Band-Aids.”