Facebook founder Mark Zuckerberg said his company is not biased against President Donald Trump, disputing claims made by the president that the social media company is against him.

"Trump says Facebook is against him. Liberals say we helped Trump. Both sides are upset about ideas and content they don't like. That's what running a platform for all ideas looks like," Zuckerberg wrote in a Facebook post.

However, Facebook executives were in close contact with Hillary Clinton's failed presidential campaign. Zuckerberg himself met with John Podesta, Clinton's former campaign chairman, and the company has even teamed up with longtime Clinton ally David Brock to combat "fake news," according to confidential documents obtained earlier this year by the Washington Free Beacon.

In a document attached to an email released by WikiLeaks and discovered by the Free Beacon last year, Teddy Goff, the digital strategist for the Clinton campaign, wrote of having "discreet conversations" about forming "working relationships" with companies such as Facebook and Apple as early as October 2014.

"Working relationships with Google, Facebook, Apple and other technology companies were important to us in 2012 and should be even more important to the you in 2016, given their still-ascendant positions in the culture," the partnership portion of the document reads. "These partnerships can bring a range of benefits to a campaign, from access to talent and progressive donors to early knowledge of beta products and invitations to participate in pilot programs."

"We have begun discreet conversations with some of these companies to get a sense of their priorities for the coming cycle, but would encourage you, as soon as your technology leadership is in place, to initiate more formal discussions."

The memo also confirmed that Eric Schmidt, the executive chairman of Alphabet, Google's parent company, was aiding the Clinton campaign. The Schmidt-backed group involved with the campaign was never mentioned by name, although he had provided funding to a tech company called The Groundwork, which ultimately received hundreds of thousands from Clinton's campaign.

Zuckerberg met with Podesta on at least one occasion, according to another email.

"I enjoyed spending time with you yesterday and our conversation gave me a lot to think about. Thanks for sharing your experiences with CAP and some of the choices you made as you put the organization together," Zuckerberg wrote to Podesta on August 7, 2015. "I hope it's okay if I reach out as my thinking develops to get your ideas and reactions. If there are any other folks you think I should talk to, please let me know. Thanks again. I look forward to continuing our conversation."

Sheryl Sandberg, the chief operating officer of Facebook, is additionally shown communicating with the Clinton campaign on a number of occasions within the hacked Podesta emails.

Dustin Moskovitz, Facebook's cofounder, committed $20 million to Clinton and other Democrats last year. Zuckerberg hired Clinton's former pollster in August of this year, a possible prelude to a presidential campaign of his own.

The Free Beacon attended a retreat in January hosted by David Brock, the liberal operative who founded Media Matters and is a close ally of Clinton, where he huddled with more than 100 deep-pocketed donors at the posh Turnberry Isle Resort in Aventura, Fla.

As the retreat was underway, the Free Beacon obtained a copy of a confidential Brock memo that outlined his four-year agenda of attacking Trump and Republicans using Media Matters, American Bridge, Citizen's for Responsibility and Ethics in Washington (CREW), and Shareblue.

The memo, which contained plans such as defeating Trump through impeachment, also spoke of how Media Matters was partnering with Facebook to combat "fake news."

Facebook began talks with Brock's company after it had launched a "fake news" petition drive in 2016, according to the documents.

"It became clear from these conversations that Facebook needed our help in fully understanding the problem and identifying concrete solutions, the memo states. "Further, it also became clear that we had information and insight that they didn't have that was helpful in educating them on the full scope of the problem. For example, Media Matters had a detailed map of the constellation of right-wing Facebook pages t hat had been the biggest purveyors of fake news—as well as insight into the food chain of fake news and how it was moving through the Facebook ecosystem."

"We've been engaging with Facebook leadership behind the scenes to share our expertise and offer input on developing meaningful solutions," the memo says.

Facebook has come under fire in recent weeks after it was revealed that Russian-funders had bought $100,000 worth of political advertisements leading up to the 2016 presidential election.

Politico reported that the purchases "backed" Green Party candidate Jill Stein, Sen. Bernie Sanders (I., Vt.), and Trump. The ads, however, "didn't necessarily hew to promoting Trump and bashing Clinton." Russians also bought a Black Lives Matter advertisement that targeted individuals in Baltimore and Ferguson.

Marc Elias, Clinton's campaign lawyer, helped Facebook avoid political ad disclosures years before acting as her general counsel.

Facebook did not return a request for comment by press time.