Robert Alexander posted the woman's name, address and photograph on the social networking site - branding her promiscuous and captioning the picture "HIV riddled LOL".
He then claimed she slept with men without telling them of her condition - and even "deliberately set out to infect others with it".
When he was arrested Alexander said he was angry with the woman and wanted charges pressed against her.
Dundee Sheriff Court heard Alexander had been a school friend of the woman, who was not named, and they had become friends on Facebook in 2012.
They began sending private messages to each other daily in February 2013 and started a relationship in April last year. They broke up three months later.
Fiscal depute Charmaine Gilmartin said: "They had sex and she was HIV positive and on medication. He became aware she was infected with HIV and she states she advised him of this."
Alexander disputed this, saying he did not find out until later and that he had reported the matter to the police.
Ms Gilmartin continued: "On February 9 a Facebook friend posted 'how funny is it when you hear someone getting hitched - then you are, like, shouldn't I have got an STD test'.
"Nine people liked it and four people posted comments. He posted this was like the complainer having sexual intercourse and not disclosing that she had HIV. He then posted 'HIV riddled LOL'.
"He added a further comment naming the complainer and again stating that she was HIV positive and slept with men without telling them of her HIV status."
He then posted stating her full name and where she lived.
"A friend of the accused saw the postings - she was also a friend of the complainer," said Ms Gilmartin. "The complainer was horrified and requested screenshots of the postings. She was upset and angry and concerned about the effect on her employment and didn't want members of her family who didn't know about her condition to find out."
Alexander, 50, of Lawton Place, Dundee, pleaded guilty to a charge of behaving in a threatening and abusive manner
Defence solicitor Ross Bennett said he would reserve his plea in mitigation for a later sentencing date. Sheriff Kenneth McGowan deferred sentence until next month for social work reports. He said: "This is an unusual case."