Maybe it's what he posted and the reason he is in jail that is the cause of him getting beat up. It involved children.
That could be, but i would think prisoners would see it as just a stupid comment he made unless he gave them reason to think he just might be screwy enough to have done what he “joked” about.