embedding a dynamic map of foursquare check-ins into your website

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.

Advertisements

About Cameron
I'm a final year Computer Science/Information Systems major. Already finished my BA in Politics/Philosophy. I do web and software freelance on the side, while I finish studying. Hoping to be self-employed by the end of my degree, otherwise off into the real-world I go....

One Response to embedding a dynamic map of foursquare check-ins into your website

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

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

%d bloggers like this: