I'd advise you to pay attention to situations where the food is around. He musn't be present at parties, picnics or any other situation where many people gether in order to eat together. All your relatives and friends are strangers for him, he smells food and it is natural for dogs to be self-protective over food issues even if they really stuffed themselves before the guests arrived. Hugging and paw touching were read by him as attempts to shoo him away from the table. You, feeding your guests ( he knew that the food they ate appeared before they started to arrive, he smelled it from your hands) and giving them your attention provoked his jealosy. That, I guess, was the issue with children in the past.
So, I read it as a wish to be upgraded with the position in the pack because he is an adult dog. Some small "puppies" and some casual adults cannot possibly be that important for his owner as him - that was the thought which upset his apple cart. He, probably, would never have snapped at anyone if wasn't irritated by your guests. Please, don't forget that it was him who was upset first. He is upset, you are upset - I wouldn't bother training him something he might turn is unable to be trained in if I were you. Just lock him away every time you have a party.