when he looks like he is about to snap, jerk his leash. (not too hard) if he doesn't snap, immediatly give toby praise and a treat.
I would not recommend this method at all. jerking the leash will most likely only make it worse. if he is snapping out of fear then making a situation he already feels uncomfortable in even more unpleasant by adding the pain and shock of a leash pop will only make him even more fearful and snappy.

is he snapping aggressively or is it playful biting? he is a puppy right? how old exactly? puppies naturally bite and nibble so if its playful exploratory biting then I wouldnt be as worried as if it was fear based. does his body stiffen up, does his curl his lips, growl, tuck or stiffen his tail, turn his eyes away or raise his hackles? do you notice the people he does it to doing anything different than others? its really hard to give advice without a ton of information. if you think its fear based I would recommend contacting a trainer A.S.A.P. plus they will be able to help you more than us because they will be able to see him in action and identify whats triggering it. keeping him away from people should only be a temporary solution. you do not want to stop his socialization all together without fixing the problem because it will only get worse. its a lot easier to deal with puppy bites than adult dog bites. and it will be easier to fix the younger he is.

has he been to any training classes yet? does he play with other puppies ever?