A federal judge has ruled on a First Amendment case that President Donald Trump cannot block people on his Twitter feed for expressing their political views.