“This is unfair and unjust … this proves that there is no freedom here,” Chargui, 27, told Reuters from home where she had been waiting for the ruling.
She plans to appeal as allowed within 10 days, Reuters reported.
Chargui’s sharing of the post in May angered many social media users who demanded punishment.
Court spokesman Mohsen Dali said the sentence was on charges of inciting hate between religions and races.
Chargui’s lawyer said in May that she had been summoned by police and the prosecutor’s office had launched an investigation into the case.
According to the lawyer at the time, she would be tried based on Article 6 of the country’s Constitution that underlines the government’s duty to protect religious sanctities and prevent desecration of those sanctities.