Especially when you’re the mayor of a Starbucks location on Foursquare.

On Monday, Starbucks announced a new loyalty program that rewards dedicated players of Foursquare — a mobile social networking game that allows users to share their locations with friends — with discounts for anyone who earns a Mayor’s badge at a Starbucks location on Foursquare.

According to Mashable, Foursquare players in the United States can earn discounts on Starbucks products with their frequent check ins using the mobile social network. Canadian Starbucks mayors can take advantage of the promotion as well.

Now, Mayors of Starbucks locations on Foursquare can get $1 off a Frappuccino. The message they receive on their mobile device reads:

“As mayor of this store, enjoy $1 off a NEW however-you-want-it Frappuccino blended beverage. Any size, any flavor. Offer valid until 6/28.”

Starbucks began its customer loyalty experiment with Foursquare earlier this year when the coffee chain began offering Foursquare members the chance to earn Barista badges when they checked in at a Starbucks location five times.

With the ubiquity of GPS-enabled smartphones, many retailers are looking at new ways of reaching potential customers through social networks like Twitter, Facebook and Foursquare while they’re out and about.

The idea is that retailers can target potential customers in the immediate vicinity of their location by offering exclusive coupons. Since those potential customers are already near the retailer, the odds of their using the coupon goes up, thereby maximizing the bang for the marketing buck for the retailer.

Although the Mashable story doesn’t discuss the financial terms of the partnership between Starbucks and Foursquare, it’s clear that the coffee giant is taking mobile marketing through social networks seriously, paving the way for more retailers to jump on the location-based marketing bandwagon.