A man known as the Facebook "spam king" has been sentenced to 30 months in prison for an elaborate scheme that saw him share a whopping 27 million unsolicited messages on the social network.

The perpetrator, 47-year-old Las Vegas resident Sanford Wallace, has also been ordered to pay a $310,000 fine, according to the Office of the United States Attorney for the Northern District of California.

Arrested in 2011, Wallace pleaded guilty to one charge of fraud and one count of criminal contempt. He confessed to illegally obtaining the details of approximately 500,000 Facebook users from November 2008 through to March 2009. Wallace will begin serving his sentence on September 7.

More from Digital Trends:

Online privacy worries increasingly keep Americans off the Internet, study says

Facebook reintroduces SMS integration to Messenger for Android

The history of social networking

Everything you need to know about the Facebook Trending Topics bias controversy

Wallace's scam involved sending users links to external websites that gathered their Facebook account details, including passwords and friends lists. He would then spam those extensive lists of people with even more links, earning money by directing traffic to websites.

 

Facebook filed a lawsuit against the self-professed "spam king" in 2009. A judge from a Northern California district court subsequently ordered that Wallace could no longer access the platform. He was also barred from creating or maintaining a Facebook account. At the time, Wallace was ordered to pay $711 million in damages to the social network, but, and this is perhaps no surprise, he has not been able to do so.

However, in April 2009, Wallace admitted to disobeying the order by logging into his account on the social network whilst aboard a flight from Las Vegas to New York.

Wallace "spam king" Sanford first gained infamy as a spammer in the '90s for sending junk fax messages. Former social media giant MySpace also successfully brought a case against him in 2008, for which he was released on $100,000 bail.