The judge noted that the president’s social media posts contradicted multiple government officials’ sworn testimony.