2. Hugs are for humans, not animals
Humans have interesting ways to communicate affection, closeness, and love. A hug is a gesture to show that you care and you are friends. However, to a dog, this is a mere irritation that only annoys them. When you look at dog’s culture, when dogs touch other dogs, it is usually to claim some sort of domination. Imagine your feet in their shoes for this one. A human comes and hugs you; you would get annoyed over the potential domination if you were a dog. The point is, if you can avoid extreme closeness with your dog or your friend’s dog, and then do it. Rather than hugging, consider a gentle petting to show you are friendly.