A 17-year-old girl posted a picture of her grandmother's cash savings on her Facebook page and triggered a home invasion, police say.

The robbery in the southern highlands led police today to warn social media users about thinking twice before posting personal information and photographs.

The teenager took the picture of her 72-year-old grandmother counting a large sum of money at home in Sydney on Thursday afternoon and uploaded it to Facebook.

More than eight hours later, about 11.30pm, two men armed with a knife and a wooden club broke into the girl's mother's home in Bundanoon and demanded to speak to the girl, police said.

When the mother told them the girl no longer lived there, the men searched the house, stealing a small amount of cash and other personal property.