A teen convicted of emailing pictures of an alleged rape at a rave in Pitt Meadows, B.C., that were eventually posted by others on Facebook has been sentenced to 12 months probation for distributing obscene material.

The teen, who cannot be named because of his age, was also sentenced to write an essay on the harmful impact of social media by the judge on Friday in provincial court in Port Coquitlam.

He was initially charged with production and distribution of child pornography, but pleaded guilty to the lesser charge in December.

Police allege a girl, 16, was raped at a rave at a rural property in Pitt Meadows, east of Vancouver, in 2010.

Cellphone photos of the incident were posted on Facebook. After the pictures were posted they were widely distributed on social media, prompting the RCMP to make a public appeal to teens to stop reposting them.

Two other people have been charged in connection with the incident. Colton Ashton McMorris was charged with sexual assault, while Dennis John Allen Warrington was charged with distributing child pornography.