(Reuters) - Facebook Inc's FB.O CEO Mark Zuckerberg on Wednesday defended his company's role in U.S. elections and rejected assertions in a tweet from U.S. President Donald Trump that the social network was against him.

Zuckerberg has been on the defensive for weeks over revelations that Russian agents bought ads on Facebook and created fake accounts to inflame political tensions in the United States ahead of the 2016 presidential vote.

In a Facebook post on Wednesday Zuckerberg said both Trump and liberals were upset about ideas and content on Facebook during the campaign.

“That’s what running a platform for all ideas looks like,” Zuckerberg said on Wednesday.

Zuckerburg noted that the 2016 campaign was the first in the United States where the internet was a primary way candidates communicated and said the ability of candidates and voters to interact was a good thing.

He also pointed to “get out the vote” efforts that had spurred almost 2 million people to register to vote.

In the same post, Zuckerberg said he regretted saying after the election that it was “crazy” to think that misinformation on Facebook changed the outcome of the election, adding that the comment was “dismissive.”

Earlier on Wednesday, Trump’s tweet criticized Facebook as “anti-Trump” and suggested the company could have colluded with other media outlets that opposed him.

Facebook is part of investigations both houses of Congress and special counsel Robert Mueller are conducting into Russian influence in the 2016 election.

Facebook on Wednesday was asked to testify before two separate Congressional committees. It is not clear whether Zuckerberg or other executives will appear.