Williams, the defendant, had offered to exchange pictures of his child involved in sexual activity for pictures of other children — clearly a violation of the law.
Justice Scalia authored the opinion, with everyone but Justices Souter and Ginsburg joining in.
It's a complex decision, not least because the First Amendment in this area is rather convoluted law. So the court had to step carefully across the minefield. In any case, the law has been upheld, so all those seeking to promote child pornography online are now in much greater danger of spending serious time in prison.