Syncing Foursquare / Swarm checkins to my website

November 13, 2017

Neotoma (on GitHub) now backs up all of my Foursquare / Swarm check-ins to my Dropbox account whereupon they’re republished instantly to my website on a new check-ins page.

This setup relies on the same publishing technique as my other website content as well as recent changes to the Neotoma sync software.

That software now transforms Foursquare check-ins copied initially in a proprietary JSON format from its API (e.g. one from this past weekend) into a cleaner JSON API format before saving them to Dropbox so my website software can easily understand and serve them as content:

 data: {
   id: "foursquare-5a0719c1d4cc9849790606eb",
   type: "check-ins",
   attributes: {
     place-state: "Catalonia",
     place-postal: "43840",
     place-name: "Corcega",
     place-longitude: 1.1382177519242145,
     place-latitude: 41.076488193500616,
     place-country-code: "ES",
     place-country: "Spain",
     place-city: "Salou",
     place-category: "Spanish Restaurant",
     place-address: "C. Major, 31",
     photo-url: "",
     likes-count: 1,
     foursquare-venue-id: "4d0bce3d46bab60c9cc82990",
     description: "Primera calçotada de l’any!",
     created-at: "2017-11-11T15:39:45.000Z"

The exact format I use here is definitely going to evolve as I build out functionality around this data on my website. For example, I plan to break out the places embedded in check-ins into their own files so I can rank the places I visit by frequency. But for now this format provides a quick and simple way to get the check-ins displayed reverse chronologically.

Also, Neotoma currently conducts a full historic backup of my check-ins when I connect my Dropbox and Foursquare accounts to it, but it doesn't keep watching for new check-ins.

I'll be improving the system shortly to sync all new / future check-ins automatically so they appear on my website as well, both on the above check-ins page and on the homepage where I show my latest check-in up top.