I've been preaching your trick for years! I learned it first when driving a cab .... it's amazing the effect it has on the customer when the 'dog who never likes anyone' likes you!

Do be carefull, though. Use only real dog treats... other food, and especially cat food, is too rich and can give Fido the 'trots.'