Londoner Laleh Shahravesh, 55, was held after flying to the city to attend her ex-husband's funeral.
Shahravesh was facing up to two years in jail in Dubai and a fine of 50,000 pounds for the insult.
Under the cyber-crime laws in the United Arab Emirates, defamatory statements on social media can attract a fine or a jail term.
According to Detained in Dubai, Shahravesh was married to her ex-husband for 18 years, during which time she had stayed in the UAE for a few months.
While she returned to Britain with her daughter, her husband stayed back, and the couple got divorced.
When Shahravesh saw her ex-husband on Facebook with his new wife, she posted two comments in Farsi, including one that said: "I hope you go under the ground you idiot. Damn you. You left me for this horse."
Shahravesh was arrested when she went to Dubai to attend her former husband's funeral.
Shahravesh's ex-husband's new wife, who lives in Dubai, reported the comments, according to Detained in Dubai.
"We maintain that the case against Laleh should have been dismissed at the outset, and while we are pleased that her nightmare is over, her conviction on this absurd case sets a dangerous precedent," Radha Stirling, the Chief Executive of Detained in Dubai, was quoted as saying by the BBC.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)