* If you have an account on a social-media network, and
* If you use that account to make official statements in your official capacity as a government official, then
* You must follow the rules government officials are subject to with respect to channels for official communications in their official capacities.
Among those rules are: you have to let the general public see what you're saying, and give them the opportunity to reply and comment, and cannot prevent them from seeing, replying or commenting simply because you don't like their opinions.
This should be completely unsurprising, but apparently a lot of people on HN are surprised at this.
(another fun and as-yet-undecided-by-a-court question is whether it's legal for him to delete tweets, since there are also record-keeping laws which typically require official communications to be preserved, and apparently HN is surprised at that too, judging from some of the other subthreads here)
Didn't the administration state that Trump's tweets are official statements a while back? That might be a big reason why.
Edit: Yup, they did.
https://www.cnn.com/2017/06/06/politics/trump-tweets-officia...