An armed robber posted about his plans to steal from Tesco on Facebook moments before he was arrested.
Andrew Hennells, 31, was caught in a pub in King's Lynn with a knife and £410 in cash.
A member of the public had called Norfolk Police after witnessing him demanding money at a branch of Tesco in the area.
Hennells had posted "Doing. Tesco. Over" on Facebook at 7.25pm on 13 February, 15 minutes earlier.
He pleaded guilty to robbery and carrying a knife as an offensive weapon at Norwich Crown Court.
Sgt Pete Jessop, from King's Lynn CID, said that the incriminating Facebook post had helped investigators build their case against Hennells, who will be sentenced on April 8.
"It was a bizarre and unusual case," he said. "The pictures and posts on Facebook helped us confirm what we already knew.
"None of this takes away from the seriousness of the crime or the trauma experienced by the victims of the robbery."Reuse content