He was referring to the fact that Sally Q. Yates, then the acting attorney general, informed the White House in January that Mr. Flynn had apparently misrepresented the nature of his communications with Sergey I. Kislyak, the Russian ambassador, saying they had not spoken about United States sanctions against Moscow — when they had.

Mr. Flynn resigned three weeks later, ostensibly because he had lied to Vice President Mike Pence about his talks with Mr. Kislyak, and Mr. Pence had gone on to repeat the mischaracterization publicly in a television interview.

The testy social media exchange on Friday was the latest turn in the increasingly bizarre saga surrounding the Trump White House and the investigation into connections with Russia. The credibility of the inquiry was thrown into question on Thursday after it emerged that a pair of White House officials had helped provide Representative Devin Nunes of California, a Republican and chairman of the Intelligence Committee, with intelligence reports showing that Mr. Trump and his associates had been incidentally swept up in foreign surveillance by American spy agencies.

Armed with the information, Mr. Nunes held a news conference and made a public show of going to the White House to hand-deliver information to Mr. Trump, an apparent effort to help the White House explain why the president had taken to Twitter early this month to accuse President Barack Obama of wiretapping his telephone. The chiefs of the F.B.I. and the National Security Agency have both testified that such surveillance never took place.

Mr. Nunes postponed a hearing that was to take place this week at which Ms. Yates was to testify.

It was not clear from Mr. Trump’s post on Friday whether he fully appreciated the potential impact on his administration if Mr. Flynn received immunity to participate fully in the investigation. But he has said previously that seeking protection from prosecution is a telltale sign of wrongdoing.