When you love getting petted as much as I do, you learn to do it well.
You wouldn't think that getting petted requires effort on the recipient's part. But you'd be wrong.
The key is to place your head wherever the human's hand happens to be located. If he's sitting in his chair and his hand drops to the side, quickly run over there and put your head or back under it. If he's standing, go sit next to him and and rear up until your head is, again, right under his hand. (see the photo and my excellent form utilizing that particular method)
Another tip... be relentless. If they say no, just walk away for a moment. Get a drink of water. Go outside. Then come back and try again. Sometimes they forget that they just said no.
Of course, I must admit that the fondness I have for the alpha male in my house helps. I remain by his side constantly. He pets frequently... and he's damn good at it.
Humans also love loyalty. That's why the alpha male adores me. I kiss his ass.
But it pays off. I have free reign of the house... I sleep in the human's bed... and, thankfully, there are no other dogs here to get in my way.
Life is good.