A paedophile was caught by members of a vigilante group when he turned up at a railway station believing he was about to meet a 14-year-old girl for sex.
Shane Cranfield was locked up for 15 months after a court heard he was arrested followed an online sting by a paedophile hunter group.
Leeds Crown Court heard the group, called Catch Online Predators, were contacted by a young woman who had concerns about the way Cranfield had behaved on Facebook.
Adam Walker, prosecuting, said Cranfield sent messages to the woman before sending her an explicit picture of himself.
The woman deleted the image and blocked Cranfield from messaging her.
Cranfield then made contact with the woman's profile using a different account name in June this year.
Mr Walker said the woman knew it was Cranfield as she recognised his photo but pretended not to realise.
She replied and told Cranfield she was a 15-year-old girl.
Cranfield sent a series of sexual messages and asked to meet her.
The woman alerted the paedophile hunter group who then targeted Cranfield.
A fake account was set up purporting to be a 14-year-old girl called 'Abbie' from Bradford.
Contact was made with Cranfield who sent a sexually explicit video of himself in a public toilet.
Cranfield also asked 'Abbie' to send him naked pictures of herself.
Arrangements were made to meet Cranfield at Wakefield Westage station.
Cranfield sent a message describing what he was wearing and stated that he would be waiting outside Subway.
Mr Walker said Cranfield was detained by members of the group who alerted police and handed over evidence.
Cranfield, 22, of no fixed address, pleaded guilty to attempting to meet a child under 16 following grooming and attempting to engage in sexual communication with a child.
James Littlehales, mitigating, said Cranfield was of low intelligence and suffered with his mental health.
Judge Tom Bayliss, QC, said he was imposing the prison sentence after reading a probation service report which assessed him as posing a high risk of re-offending.