Two teens who robbed a newsagent before bragging about it on Facebook were caught through their underwear being captured on CCTV, police said.
Reece Winfield (18) and Corey Hobson (17) attacked the shopkeeper during the raid in Mansfield, Nottinghamshire, before stealing cigarettes and alcohol.
Minutes later Winfield took a photo of Hobson with the stolen items and posted it on Facebook.
Hobson also commented on a newspaper link to an article about the robbery which was posted on the social networking website, saying: "Hehehe that's me."
But it was their underwear, caught on CCTV hanging out above their low-slung trousers, that helped police to track them.
When they were arrested two days later, they were still wearing the same underwear, Nottinghamshire Police said.
The shopkeeper received minor injuries in the incident at the newsagent on February 5 this year.
They commented on the robbery on Facebook.
Hobson, of no fixed abode, and Winfield, of Nottingham, were both sentenced to 32 months for robbery and four months for attempted arson at Nottingham Crown Court on Thursday after pleading guilty.