A student wrote on social media that he had tried to rape her - in a post read by millions.