Washington (CNN) The Supreme Court unanimously struck down a North Carolina law that bars the use of commercial social networking sites, including Facebook, by registered sex offenders.

A lower court upheld the law, but lawyers for Lester Gerard Packingham -- who is a registered sex offender -- say it is too broad and swept in their client even though his Facebook posting concerned the fact that his parking ticket was dismissed.

"No fine, no court costs, nothing spent... Praise be to God" he wrote.

After the office came upon the posting, Packingham was found guilty of violating the law that says "it is unlawful for a sex offender who is registered ...to access a commercial social networking site where the sex offender knows that the site permits minor children to become members or to create or maintain personal Web pages on the commercial social networking site."

North Carolina argues the law was passed to "confront the threat sexual predators pose to children."

Read More