embedding a dynamic map of foursquare check-ins into your website
Saturday, February 12th, 2011 1 Comment
I’ve just been working with embedding foursquare locations in a website, and displayed on a map. After a bit of a fiddle around, I’ve come up with, what I think is, a very simple and dynamic solution. Simply go to http://foursquare.com/feeds/ and get your KML link.
To the end of this append ?count=ABC (where ABC is the number of results you want); e.g.:
http://feeds.foursquare.com/history/[YOUR_PERSONAL_CODE_HERE].kml?count=1
Be warned that you should keep this link private, as it gives access to your foursquare data.
Now, head across to Google Maps and past this link in the search box and click ‘Search’. You will end up seeing a map with your most recent (in my example I used ’1′) foursquare check-in pin-pointed. This link is dynamic, in that it requests the most recent check-in from foursquare at time of use.
With this you can then grab the embed code from Google Maps and paste this into your site to provide a currently updated map showing where you last checked-in to foursquare. Again, be aware that the link to your foursquare data will be visible if someone knows how to inspect the source code of your page. For this reason, I recommend doing what I have done below, and pasting the check-in/s as images. This is not dynamic, but it is secure.

Pingback: Tweets that mention embedding a dynamic map of foursquare check-ins into your website « whileloop -- Topsy.com