From one of my favorite dog sites, "My Smart Puppy". Maybe my favorite. I thought this article was about kids and dogs but it isn't. It is a very well-conceived game to play with your kids to teach them the proper response to a friendly stranger. As a dog-trainer, teacher, parent, and once a child. . . "Read this!" This is WONDERFUL! Sarah's a great trainer!
Frankly, sadly, this advise should probably also apply to child, teen, anyone who asks your child to go do something without asking you first. If you are a child, even if another child asks you to go with them, you stop and go ask mom or dad.