A drug supplier was tracked down by a teenager’s dad on Facebook after the girl was found unconscious in the street.
The 23-year-old suspect, Marc Barron, offered the 14-year-old schoolgirl and her friend ecstasy in a flat in Post Glasgow.
Later, the girl was found passed out on a nearby footpath and rushed to hospital.
The next day the girl was quizzed by her father and she told him what had happened. He then found Barron on Facebook and sent him a private message.
They arranged to meet in a supermarket car park where the 23-year-old apologised for what had happened.
Both men then went to a police station, where Barron pleaded guilty to supplying the Class A drug to two 14-year-olds.
His sentenced has been deferred until 27 June for an updated criminal justice and social work report.

Boy, 15, Charged with Murder After Fatal Wembley Stabbing
Three Bradford Shops Closed Over Illegal Goods and Anti-Social Behaviour
Man Jailed After Deliberately Driving Car at People Outside Bradford Casino
Man Charged with Murder and Eight Attempted Murders Following Hounslow House Fire
North Yorkshire Police Warn of Rise in Fake Police Officer Fraud
Bradford Somali History Project Wins National Cultural Award
Plans to Turn Former Halifax Pub into Builders’ Merchants Rejected
Plans Submitted for 25 New Council Homes in Farsley
Consent Conversations Campaign Comes to Leeds Festival for First Time
Legal Show
The Golden Era
Remix Saturdays
Alim OnAir