Robert Horner issued obscene comments online following the decision to restrict flying of the Union flag at Belfast City Hall. The 21-year-old, of Carnhill Place, Carrickfergus, Co Antrim, claimed he acted in a moment of anger.
Horner admitted a charge of improper use of public electronic communications.
His comments were made on 3 December last year - hours after councillors in Belfast voted on the controversial flag issue.
The decision to only fly the Union flag on designated days led to widespread loyalist protests and threats and violence directed at Alliance representatives.
Belfast Magistrates' Court heard on Thursday how a co-accused first posted comments on the party's Facebook page.
Horner then responded to that expletive-ridden outburst with his own suggestion. A prosecution lawyer said he posted: "Should wreck their office in Carrick."
Police subsequently searched his home and arrested him for the alleged offence.
"He stated that he commented as everyone else was making similar comments," the prosecution representative told the court.
"He said he thought he was making a private comment on a friend's Facebook page."
According to the defence Horner believed his account was set to private.
"He essentially jumped on the bandwagon and made this comment in an act of stupidity or an act of bravado in relation to other comments made by friends," his lawyer said.
"He certainly didn't believe that particular comment would have found its way onto the Alliance Party Facebook account."
Horner, an unemployed man, was said to be extremely apologetic for acting "in the heat of the moment".
The court heard he is in a mixed-religion relationship and belongs to no political party or cultural organisation.
Deputy District Judge Bonita Boyd accepted a recommendation that he should carry out community service.
Sentencing Horner to 100 hours, she told him: "You are going to have to do unpaid work."