The robbery took place in March this year, when the teenage girl and an accomplice used a 30-centimetre-long knife to rob a Max hamburger restaurant in Halmstad, southern Sweden.
The girls had used a smartphone to take pictures of themselves wearing balaclavas and holding the knife right before the robbery, evidence the police later used in apprehending them.
The pair was found just 47 minutes after the crime took place, traced by sniffer dogs. They had managed to get away with 2,420 kronor ($370) from the diner after witnesses say they held up the knife to restaurant staff and yelled "Give me the money or I'll stab you".
When tracking the girls, police found a bag filled with money as well as the phone used to take the selfie. They traced the girls back to the home of the grandmother of the convicted girl, who told officers that the two had just returned from a walk.
Despite the overwhelming evidence, the 17-year-old denied the crime, and police were unable to connect enough evidence to convict the other. The teen explained the pictures taken in the mirror as nothing more than a joke.
On Friday, the older of the two teens was sent to juvenile detention, a punishment that would have been much harsher if she was over 18.
The court heard that she was from a troubled home, and that she was an outcast from her own family.
She will also get help from a youth psychiatrist.
Among other evidence found on her phone, including more selfies and a picture of the loot, police found a quote by US poet Ralph Waldo Emerson: "Commit a crime and the world is made of glass".