Agree with 3GSD,
Although there can be a different tact with people you know. If they ask to pet the dog, then you need to instruct them about proper greeting of the dog. YOU need to control the "meeting".
First, instruct the friend to ignore the dog. No look, no talk, no touch. The indication will come from the dog. The dog may become curious and approach the person to smell. Still the person is No look, no talk, no touch. If the dog shows no signs of reluctance, then you can instruct the person to slowly kneel down on one knee, offer the dog one hand palm up for the dog to smell (this is for small dogs). Large dogs the person does not need to kneel. Here again take your cues from the dog's behavior. If the dog remains in calm state without reluctance, then the person can pet the dog. Instruct the person DO NOT PET THE HEAD OR COME FROM ABOVE, ONLY pet the BODY.
My point is all the cues come from the dog's behavior. The human does not approach first.
My silly mini-schnauzer wants to meet everyone. I always follow this guideline. There have been a few times when my dog has shown the first curious sniff, then backed away. This was the cue to stop the meeting. Other times, people have rushed up to pet my dog, I stepped in to halt their approach and prevent the meeting. One of my most difficult encounters was with some kids that would not accept NO when they were rushing in on my dog. I tried to be polite to reject their advances, finally I told the kids "My dog bites". They gave me a strange look, mumbled something then left us alone.