FOUR-YEAR-OLD Riley Martin was lying face down in the scrub, just in a T-shirt, nothing else.
An excitable dog had drawn the searchers Leif O'Brien and his partner, Sally Pratley, to the missing boy, who was covered in scratches, bruises and dirt.
''[Riley] was cold … and as Leif picked him up, his little head just turned around to look at us, and I just went, 'He's alive,''' Ms Pratley said.
Social media came to the rescue unexpectedly yesterday in the desperate search for the boy with Down syndrome who had wandered off from his Nambucca Heads home in the state's north.
A search was launched that included local police, water police, the dog unit, the police air wing, Polair, and police on trail bikes, as well as volunteers from the SES, the surf club and the Rural Fire Service.
But it was Facebook that played the star role in Riley's rescue.
Ms Pratley and Mr O'Brien travelled to Nambucca from Kempsey to join the search after learning of his disappearance on Facebook on Wednesday evening.
Ms Pratley saw the image of Riley shared on a buy, swap and sell Facebook site and was able to link it back to the NSW police Facebook page to read about his disappearance.
With six young children of their own, the couple felt compelled to join the searchers.
After speaking to police, they searched an area of the beach through the night until they heard a dog bark and found tracks leading into thick, dangerous bushland.
They tried several times to enter the dense bush but had to wait until daybreak, when they heard a dog bark again, and found little Riley lying face down in the scrub.
It is one of several cases of social media aiding police and emergency services. Despite frantic television appeals to locate them, two Adelaide girls lost in a drain pipe in 2009 were found after they updated their Facebook status and it was seen by a friend.
Last week, two young thieves who broke into the Annandale Hotel were arrested after CCTV images uploaded to Facebook by the pub's owners were shared thousands of times.
Further afield, a woman and child who were held captive and tortured for five days in their Utah home last year were rescued after the mother was able to sneak on to Facebook and plead for help.
''It's the power of instant communication,'' said the director of public affairs for NSW police, Strath Gordon. ''People just have to press the share button and something can reach millions of people. That's a very powerful tool for us.''
Mr Gordon said the NSW police's Facebook page experienced spikes in audience activity during those times when members of the public felt they could help.
The disappearance of the toddler Kiesha Weippeart and yesterday's search for Riley were two examples.
Riley's photo was shared 9000 times and the online appeal helped rescue teams locate the boy, Mr Gordon said.
Riley's mother, Bianca Graham, said her son ran out an open gate to chase the three family dogs on Wednesday afternoon. He was found 19 hours later with one of the dogs, which his mother believes kept him alive.