WASHINGTON – Facebook executive Sheryl Sandberg acknowledged in a Capitol Hill hearing Wednesday that the company was too slow to respond to efforts by foreign actors, including Russia, to use its platform to interfere in U.S. elections.

“We were too slow to spot this and too slow to act. That is on us,” Sandberg told the Senate Intelligence Committee hearing that was focused on whether regulatory changes are needed for social media giants.

“We’re getting better at finding and stopping our opponents,” she said.

The mostly conciliatory hearing with Sandberg and Twitter CEO Jack Dorsey came as both Democrats and Republicans have inched closer to regulating social media. The executives detailed steps to address foreign influence but also acknowledged the problem of protecting free speech while weeding out misinformation is daunting.

Dorsey discussed labeling automated accounts, or bots, on Twitter. Sandberg said Facebook had removed hundreds of pages and accounts engaged in "coordinated inauthentic behavior." While lawmakers said they appreciated the effort, it wasn't clear whether the testimony was enough to satisfy their concerns.

"I’m skeptical that, ultimately, you’ll be able to truly address this challenge on your own," said Sen. Mark Warner, the committee’s top Democrat. "Congress is going to have to take action here."

North Carolina Sen. Richard Burr, the Republican chairman of the committee, said he also has lingering concerns about the companies' ability to address the problem.

"Without question, positive things are happening," Burr said. "But clearly this problem's not going away; I'm not even sure it's trending in the right direction."

Questions of bias on the platforms added a new layer of controversy to the hearing. Last week, President Donald Trump said he believed Google's search engine results were "rigged" against him, saying that when users type in his name they usually turn up stories that are critical of him. Google issued a statement saying that its search engine was not designed with the intent of promoting a political ideology but is instead aimed at generating "high-quality content" in response to user queries.

Google executives did not testify on Wednesday.

The purpose of the Senate hearing was to assess how well social media companies are confronting foreign influence on their platforms. Top intelligence officials in the Trump administration have said Russia and other countries are working to sway voters ahead of the November midterm elections. Facebook said in July that it had detected a covert campaign to influence the November elections through the use of posts on hot-button social issues, and it deleted hundreds of pages and accounts.

Dorsey told lawmakers that his company is looking into the possibility of labeling bots, which would represent a major change in the company's policy.

"It's really a question of the implementation, but we are interested in it and we are going to do something along those lines," he said.

Dorsey said Twitter found itself unprepared and ill-equipped for the immensity of the problems it has acknowledged — abuse, harassment, troll armies, propaganda and misinformation.

“We’re not proud of how that free and open exchange has been weaponized, and used to distract and divide people and our nation," he said.

In addition to probing how foreign governments are attempting to use social media, senators also questioned the executives about privacy issues and how users’ information is used. Warner asked Sandberg whether Facebook should put a value on a users' data so people know what their information is worth.

Sandberg didn’t directly answer, responding generally that “we don’t think it’s a question of 'whether regulation,' we think it's a question of the right regulation that supports users, is transparent and doesn’t squash innovation."

Asked how Facebook deals with users intentionally spreading false information – such as claiming that victims of a mass shooting were actors – Sandberg said the line between hate speech and misinformation is “very, very difficult.”

“Especially if you’re dedicated to expression, and sometimes free expression is expressing things you strongly disagree with,” she said.

Because Facebook doesn’t want to be the judge of what’s true or false, the company uses third-party fact checkers, she said. If they deem the content false, Facebook dramatically decreases distribution, warns users who have shared or are about to share the information, and places related articles next to it so viewers can see “alternative facts.”

“Bad speech can often be countered by good speech,” she said.

Dorsey said Twitter hasn’t done enough to let people know if they’ve been following a fake account, or have been targeted – as Sen. Susan Collins, R-Maine, said she has – by a foreign government.

“We need to tell people that they were taken in, or are innocent victims of a foreign influence campaign,” Collins admonished.

Dorsey agreed, saying, “it’s something we’re going to be diligent to fix.”

After the Senate hearing, Dorsey crossed over to the House for a hearing focused on whether Twitter is trying to silence conservative voices. Republican Rep. Greg Walden, chairman of the House Energy and Commerce Committee, brought up charges that Twitter is “shadowbanning” some lawmakers whose tweets were not appearing in the site’s auto-populated drop-down search bar results.

Twitter had blamed its algorithm, but Walden said humans are the ones who build the technology.

“For some of us, it seems a little bit like the `Wizard of Oz’” Walden said. “We want to know what’s going on behind the curtain.”

Dorsey said Twitter uses hundreds of “signals” to decide what to show, downrank or filter for users. Twitter needs the freedom to experiment with what works and to fix algorithms when they don’t. The company, he said, should be judged on whether it corrects mistakes, as it did in this instance.

“We agree the result was not impartial,” he said.

Contributing: Debra Barfield Berry, USA TODAY.