Donald Trump has spent the last decade promoting and supporting Facebook, but as details of Russian attempts to sway the election using the service emerge, he has begun trashing the company.

After a series of damning revelations about Russian attempts to use Facebook as a vehicle to swing the election in his direction, Donald Trump is unfriending the company he once celebrated.

Trump fumed about Facebook, lumping the company in with other standard Trump targets like the television networks and newspapers as “anti-Trump,” accusing Facebook of being part of “collusion” against him.

The tweet comes after reports have surfaced about a serious Russian attempt to sway the election through Facebook. The Washington Post reported on the “covert influence campaign” that has been exposed in the form of over 3,000 Russian-bought ads that were purchased on Facebook during the election.

Expert analysis has concluded that this could have influenced millions of voters.

The ads, which are being turned over to Congress as part of its investigation into Russian election meddling, appealed to the same racist notions that motivated so much of Trump’s presidential campaign while attacking Hillary Clinton. The Russian ads fearmongered about groups like Black Lives Matter, and highlighted Muslim support for Clinton in a negative manner.

The Post noted that the Russian ads “were similar to those that Trump and his supporters pushed on social ­media and on right-wing websites during the campaign.”

Virginia’s Mark Warner, the top Democrat on the Senate intelligence committee investigating the Facebook infiltration, highlighted concerns about how Russians knew where to target their disinformation.

Speaking to CNN, Warner said, “Did they know this just by following political news in America? Did they geo-target both geography and by demographics in ways that at least at first blush appear pretty sophisticated? These are the kind of questions that we need to get answered and that’s why we need them in a public hearing.”

Now Trump is suddenly angry about Facebook.

Over the years, he has been mostly positive about the service. He first pushed supporters to “like” his Facebook page back in 2009 — and crowed about hitting a million followers — when he was still the host of “The Apprentice.” Trump once talked about how he had purchased Facebook stock, and pushed his followers to also like his daughter Ivanka’s Facebook page.

He even posted an Instagram photo of him signing “the Facebook Wall” while visiting its New York office in 2015. Posing with a Facebook branded tablet, Trump wrote, “I had a great time today visiting Facebook NY.”

Trump called Facebook founder and CEO Mark Zuckerberg “a brilliant guy” and advised him to get a pre-nuptial agreement before he got married.

He was proud of news stories showing him exhibiting “complete domination of Facebook conversation” as the campaign began, and said he would be using it along with Twitter “to expose dishonest lightweight Senator Marco Rubio.” Rubio later endorsed him.

Trump was once happy to promote the company and its founder, buy its stock, and push his own page there. But now as Congress and others expose and investigate the Facebook-Russia nexus, Trump has added Facebook to his enemies list.