Quick tip : Compile & run Windows Phone 7 Foursquare App with a Bing Maps Key

Foursquare is a popular social application these days. The awesome folks at Foursquare built a Windows Phone 7 application and released the source code to the public. The source code (actually, a fork) was recently updated to work with the Windows Phone 7 Beta Tools, the fork is available here. If you have downloaded and compiled the source code and loaded it on the Windows Phone 7 emulator to run, you will see the following error if you click on any of the links in the main page -

If you head to the URL shown in the message box, sign in with your Live ID and create an AppId, set the AppId in the  “MapHelper.cs” file, expecting that the App to work afterwards, you might be disappointed to the see an exception raised in “ImageryService.cs” (in the method “EndGetMapUri”).

In order to compile and run the Foursquare app on the Windows Phone 7 Emulator, we will need a “Bing Maps API Key” from www.bingmapsportal.com. Once you have logged in with your Live ID, you can create a new key and copy the key into “MapHelper.cs” file, compile the application and run it -

Hope this helps someone.

More Windows Phone 7 development resources

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s