Senior executives at Facebook and Twitter have vowed to better protect their platforms from foreign manipulation during the 2018 midterm elections and into the future.

The comments from Sheryl Sandberg, the No. 2 executive at Facebook, and Twitter CEO Jack Dorsey came on September 5 in testimony in front of a U.S. Senate Intelligence Committee hearing.

Senator Richard Burr (Republican-North Carolina), the chairman of the Senate panel, welcomed the comments by the companies to do better, but said Congress was concerned that not enough had been done.

"Clearly, this problem is not going away," Burr said. "I'm not even sure it's trending in the right direction."

Congress has sharply criticized the social media companies over the past year as evidence has emerged that they failed to stop Russia making extensive use of their platforms in its alleged efforts to interfere in the 2016 presidential election.

Thirteen Russians were indicted by Special Counsel Robert Mueller earlier this year on charges of involvement in an alleged plot to disrupt the 2016 election by creating fake accounts that pushed divisive issues on Facebook and Twitter.

Responding to lawmakers, Sandberg and Dorsey both acknowledged that their efforts to prevent Russia and others from manipulating their platforms had been lacking and pledged to do more in the future.

"We were too slow to spot this and too slow to act. That's on us. This interference was completely unacceptable,” Sandberg said.

She told the committee that Facebook has "removed hundreds of pages and accounts involved in coordinated inauthentic behavior -- meaning they misled others about who they were and what they were doing."

"We are even more determined than our adversaries, and we will continue to fight back," Sandberg added.

Ahead of the committee's hearing, Facebook founder Mark Zuckerberg said in a Washington Post opinion article on September 5 that his company was engaged in an "arms race" with "sophisticated, well-funded adversaries who are getting smarter over time."

During the Senate committee hearing, Dorsey held up his phone at the witness table and tweeted part of his opening statement.

"We aren't proud of how [a free and open exchange of ideas] has been weaponized and used to distract and divide people, and our nation. We found ourselves unprepared and ill-equipped for the immensity of the problems we've acknowledged," Dorsey wrote.

"Abuse, harassment, troll armies, propaganda through bots and human coordination, misinformation campaigns, and divisive filter bubbles -- that's not a healthy public square. Worse, a relatively small number of bad-faith actors were able to game Twitter to have an outsized impact," he added.

Dorsey said Twitter was continuing to identify and suspend accounts that may be linked to a Russian Internet agency identified in the Mueller charges.

So far, he said, 3,843 accounts have been blocked.

At the session, a chair was left empty because Alphabet, the parent company of Google, refused to send a top executive, sparking outrage from some of the senators.