It depends on the contract you signed and whether there are clauses about representing the company, but in most cases photos of you at parties on the weekend don't give legitimate grounds for dismissal. Your boss can complain, but that's different from having legal justification - unless you've done something that actually compromises the company (like posting about work secrets or illegal behavior).
Keep everything in writing: if he brings it up again, ask for confirmation via email ("I saw that you commented on my social media, could you send in writing what exactly your concerns are?"). That way it's on record and protects you in case he tries to use that as an excuse to fire you without just cause.