Facebook chief Mark Zuckerberg has fired back at US President Donald Trump after he accused the leading social network of being 'always anti-Trump.'

Mr Zuckerberg rejected the idea, saying Facebook worked to ensure "free and fair elections" with an online platform that does not favour one side over another.

He added that while Mr Trump had accused his company of being biased against him, liberals had accused Facebook of helping Mr Trump.

Mr Zuckerberg's post at Facebook came after Mr Trump accused the social network of bias in a morning tweet that read:

"Facebook was always anti-Trump. The Networks were always anti-Trump hence, Fake News, @nytimes(apologized) &  @WaPo were anti-Trump. Collusion?"

Early morning Twitter tizzies have become a hallmark of Mr Trump's presidency.

"Trump says Facebook is against him. Liberals say we helped Trump," Mr Zuckerberg said in his post.

"Both sides are upset about ideas and content they don't like. That's what running a platform for all ideas looks like."

The US Senate Intelligence Committee has asked top tech companies Google, Facebook and Twitter to testify about Russian interference in US politics.

The three internet and online social media giants are expected to appear on 1 November in an open hearing on the rising evidence that they were covertly manipulated in a campaign to help Mr Trump win the presidency.

A core question in the congressional investigation is the extent to which online social networks were manipulated by Russian interests to covertly influence the US election, according to Representative Adam Schiff, a Democrat and the ranking member of the House permanent select committee on intelligence.

Russia has denied meddling with the US election.

"We will do our part to defend against nation states attempting to spread misinformation and subvert elections," Mr Zuckerberg said.