A man has been jailed for five years after posting a photo of himself with a gun on Facebook.
Detectives were then able to trace Khan through his own profile on the social networking site.
When officers raided his home they found a blank firing pistol which had been converted to fire 8mm bullets.
Khan pleaded guilty to possessing a firearm last month.
Detective Chief Inspector Steve Reed told Sky News: "Mr Khan had a good job and had no gang links.
"A gun has only one purpose and thanks to this member of the public we have managed to remove another dangerous weapon from our streets and brought to justice a man who appeared to have an unhealthy interest in firearms.
"The Facebook user who reported Mr Khan to police was typical of the stance members of the public are taking around guns in their communities."
Khan is the latest Facebook user to have brought misfortune on themselves.
Earlier this year, a Coventry call centre worker was sacked after calling a colleague a "brown-nosing cow" on her Facebook page.
Many others have suffered similar fates. In October 2008 13 Virgin Atlantic cabin crew members were dismissed after they questioned safety standards on Facebook and called passengers "chavs".