A Criminal Court judge found 24-year-old Akkaradet Eiamsuwan guilty of violating Thailand's lese majeste law, which punishes people who defame, insult or threaten the monarchy.
The ruling said Akkaradet used an alias to post the message on Facebook in March. He was arrested in Bangkok in June and has been in jail since then.
The court said it reduced an original sentence of five years' imprisonment to two-and-a-half years because the defendant had confessed to the offense.
The role of the monarchy has come under closer scrutiny in recent years due to concerns about succession when 86-year-old King Bhumibol Adulyadej reaches the end of his reign.
The political turmoil Thailand has suffered over the past eight years, with various political factions contending for power, is linked to such concerns.
Prime Minister Prayuth Chan-ocha who led a military coup as army commander in May is an ardent defender of the monarchy, having served for years in an infantry regiment known as the Queen's Guard.
Last month, a criminal complaint was brought against a prominent Thai intellectual over statements he made about the monarchy, including a comment that traditional stories about a king who died more than 400 years ago might not be true.
Sulak Sivaraksa, 82, a self-described royalist, has been the target of several lese majeste complaints since the 1980s.
The charge of lese majeste has often been used as a weapon to harass political enemies, but the number of cases has skyrocketed in recent years.
The country's current leaders have allocated a large budget to the military to protect the king and instructed schools to stress patriotic themes in their curriculums.
