Honestly? He deserved to be fired.
I think you are free to say whatever you like on facebook or twitter, so long as you make it clear its your own thoughts and you don't have your company name linked to your name. If you say stupid stuff while representing your company, you're doing it wrong.
As a side note, I think anyone being fired because of personal comments towards their employers is silly too. I think it should be an employee's right to tell their boss they are being an asshole if they are indeed acting like one. Minor authority =/= immune to being a jackass.