A dim-witted robber boasted on Facebook about plans to raid a supermarket minutes before being caught red-handed by police.
Andrew Hennells posted a comment on the social networking site reading "Doing. Tesco. Over" at 7.25pm on February 13.
Fifteen minutes later Norfolk Police were alerted by a member of the public to a man demanding cash at a branch of the store in King's Lynn.
Armed police were deployed and Hennells was caught with a knife and £410 in stolen cash, the force said.
The 31-year-old, of Riverview Way, Gaywood, is awaiting sentencing after admitting robbery at Norwich Crown Court.
Sgt Pete Jessop, from King's Lynn CID, said Hennells was found after officers were told he had fled the scene to a nearby pub.
He added that the Facebook confession made it easier to prove the case.
"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."
Hennells, who also pleaded guilty to carrying a knife as an offensive weapon, will be sentenced on April 8.