At his only news conference as president-elect, Donald Trump told a CNN correspondent, “I’m not going to give you a question. You’re fake news.”

Mayor Bill de Blasio at a contentious October news conference told a New York Post reporter, “You can keep calling all you want. I’m calling on real media outlets.”

The parallels in attitude toward the news media were familiar to prominent New York City political consultants who have worked with both men or closely observed their careers in the city over the years.

Trump and de Blasio are on opposite ends of the political spectrum. But both men interact with the news media — and handle calls for more disclosure of their finances, fundraising or professional relationships — in remarkably similar ways, the experts said.

“The mayor will stand at a podium and lecture the members of the press on how to do their job,” said Bill Cunningham, who was director of communications to former Mayor Michael Bloomberg and also served on the staffs of the late governors Hugh Carey and Mario Cuomo.

“There’s a difference in tone and degree, but basically, that’s what the president does on Twitter,” Cunningham said.

advertisement | advertise on newsday

De Blasio last month said his refusal to take questions from certain news outlets was “apples and oranges” to Trump’s.

De Blasio press secretary Eric Phillips also has taken issue with comparisons between de Blasio and Trump, telling reporters on Twitter, “You can keep calling people Trump and that doesn’t make them Trump” and, “When a reporter’s logic is questioned, call the inquisitor Trump!”

The White House did not return requests for comment for this story, but Trump has called de Blasio “the worst mayor in the United States.”

De Blasio during the presidential campaign tweeted that Trump is “a racist,” and more recently said he’d take the president to court over an executive order threatening to strip federal funds from “sanctuary cities” like New York City for immigrants.

The mayor has also called Trump a “little man” who “made a career out of ripping people off, racking up billions in debt, and bankrupting his companies.”

George Arzt, who was press secretary to the late Mayor Ed Koch, said the president and mayor have rockier relationships with reporters than their predecessors.

But Arzt, who as a TV news producer booked Trump for appearances, and as a political operative worked with de Blasio on political campaigns, said de Blasio and Trump are fundamentally different.

Arzt said de Blasio is a “true believer and progressive,” and more of an ideologue than Trump, who will “do what is necessary” politically.

Arzt and others say de Blasio and Trump each struggle with transparency issues. For instance, the mayor has long sought to protect his correspondence with at least five advisers from public disclosure laws.

The “agents of the city,” as de Blasio calls them, include private consultants whose clients have business before the city. De Blasio has argued the conversations should be privileged in a manner similar to internal city communications.

advertisement | advertise on newsday

Common Cause New York was among watchdogs who criticized de Blasio for encouraging a “shadow government.”

De Blasio aides said in December they would make future emails between the mayor and the advisers available.

Some see a comparison with Trump’s refusal to release his tax returns, potential conflicts of interest between Trump’s businesses and his presidency and counselor Kellyanne Conway’s defense of White House characterizations of the size of the inauguration crowd on Jan. 20 as “alternative facts.”

Conway has tweeted that the tax returns could be released after an audit is complete.

“Agents of change and alternative facts is the same language,” said veteran Democratic consultant Hank Sheinkopf, who has worked on the campaigns of Bloomberg, Bill Clinton and Eliot Spitzer. “They all come from the same dictionary of keep-the-press-from-getting-the-facts.”