President Trump slammed Newsweek over its story on his Thanksgiving plans, which the mag said would include “tweeting, golfing and more” — before he ended up making a surprise visit to US troops in Afghanistan.

A spokesperson for the mag told The Post that the “journalist responsible has been terminated.”

“I thought Newsweek was out of business?” the president wrote, quote-tweeting his son Donald Trump Jr.’s photo of the commander in chief serving Thanksgiving dinner to the service members at Bagram Airfield, north of Kabul.

Attached to the image was a screenshot of Newsweek’s Thursday morning story, with the headline: “How is Trump spending Thanksgiving? Tweeting, golfing and more.”

The report began, “As with any other day of the year, Trump will probably be tweeting, or expressing his opinions in another way.”

Fake news gonna fake!” Trump Jr. wrote.

In an updated version of the article, Newsweek added the president’s first trip to Afghanistan as president to the top of the story.

“President Donald Trump made a surprise trip to visit U.S. troops in Afghanistan on Thanksgiving Day and said he had reopened negotiations with the Taliban,” the updated story read.

“Newsweek investigated the failures that led to the publication of the inaccurate report that President Trump spent Thanksgiving tweeting and golfing rather than visiting troops in Afghanistan,” a spokesperson told The Post in an email.

“The story has been corrected and the journalist responsible has been terminated. We will continue to review our processes and, if required, take further action.”

During his trip, Trump met with Afghan President Ashraf Ghani and announced the restart of peace talks, as well as a planned reduction of US troops in the country.

“It’s a dangerous area and he wants to support the troops,” White House press secretary Stephanie Grisham said of Trump. “He and Mrs. Trump recognize that there’s a lot of people far away from their families during the holidays and we thought it’d be a nice surprise.

“It’s truly about Thanksgiving and supporting the troops.”