I usually complement the person in some way and then ask if I could take a photo of them. Like " I really like your outfit, would you mind if I take your photo?" I've found that works very well. Also I love the resulting photos, people have the most glowing expressions when they have just received a complement from a stranger