They have their differences, but President Trump said Friday he and German Chancellor Angela Merkel share at least one thing in common.

“As far as wiretapping, I guess, by this past administration, at least we have something in common perhaps,” Trump said during a joint press conference at the White House.

Lightening the mood after his first meeting with the German leader, Trump referenced reports in 2014 that President Barack Obama had authorized the United States to monitor Merkel’s cellphone conversations.

Merkel responded with a puzzled look, but the press corps quickly got the reference and began laughing.

When a German reporter asked Trump if he regrets any of his comments on Twitter, he said, “Very seldom” — without specifying which posts he’d like to take back.

The president also denied he’s an “isolationist,” and condemned the German reporter who asked the question.

“I don’t know what newspaper you are reading, but that would be another example of fake news,” said the commander in chief.

He reaffirmed America’s “strong support” for NATO but reiterated his stance that NATO allies need to “pay their fair share” for the cost of ­their defense.

Trump said many countries owe “vast sums of money,” but he declined to identify Germany as one of them.

Merkel, for her part, often attempted to project a more conciliatory approach, saying she agreed that Germany needed to increase its NATO expenditures and had already taken steps to do so.

And to stay on the same page as the president, she thanked him for publicly supporting the Western military alliance.

“I was gratified to know that the president underlined how important he thinks NATO is,” she said.

Only the United States and four other members currently reach the benchmark of spending 2 percent of GDP on defense. Germany spends 1.23 percent.

With Brexit still in the news, Merkel made a strong pitch for European unity by calling it the key to German success.

“That’s something of which I’m deeply convinced,” she said.

Merkel diplomatically answered a question about Trump’s style by saying that while she represents German interests, the president “stands up for, as is right, American interests. That is our task respectively.”

But she did take one indirect swipe at Trump, who continuously bashed her open-immigration policy throughout the 2016 presidential campaign.

“It’s much, much better to talk to one another, and not about one another,” said the chancellor.

The news conference ended with a handshake — a diplomatic formality that was missing earlier in the day when Trump ignored a suggestion the two shake hands for photographers in the Oval Office.