Douchebag posts douchey tweet.
Above a certain level I think that employers can reasonably hold employees accountable for this kind of rubbish but, in general, I think employers should not be able to impose their standards on employees. Unless the employee in question represented themselves as representing the company I think this kind of stuff shouldn't be grounds for dismissal.
So, while I think the guy is a tool, I think he shouldn't have lost his job and I think he should have grounds to sue the company.