But after admitting to all charges his sentence was reduced to 15 years in jail.
"The suspect had repeatedly committed wrongdoings and in this case the judge has sentenced him with minimum penalties for both charges," said the court official.
Since seizing power in Thailand in May, the army has clamped down on any opposition to its takeover, with a crackdown on perceived slurs against the royals at the heart of its stepped-up online surveillance operations.
Under the rules, anybody can make a complaint about a perceived royal insult and police are duty-bound to investigate.
Before the coup, calls for reform of the lese majeste laws had grown following several high-profile convictions.
But academics urging greater debate are among hundreds of people who were summoned by the junta and temporarily detained in secret locations.