With my own dogs (that I trust not to bite my face off), I crouch down facing them and grab their muzzles with my left hand (off hand). Then while holding the drops with my thumb and index finger of my right hand, I push open the upper eyelid slightly with my middle and ring fingers of the same hand. The drops then go into the eye at the medial canthus (corner of the eye closest to the nose).
For a dog that I don't know or don't trust, I would either back them into a corner, muzzle them, and repeat the above process, or I would approach them from behind and immobilized them with my knees on either side of the chest. Then proceed as above.
Either way takes practice and patience, but I've done quite a lot of eyedrops in my day and have had good results with these methods.