Friday, May 20, 2011

Email notifications for Foursquare Check-ins

A month or two ago a friend mentioned that Sprout Social was going to start charging her for notifications when a Foursquare user checked into the business that she managed. During the conversation it came up that she and other local businesses had a need for this sort of service. I had some time on my hands and a desire to get my hands dirty with a well-known API, so I decided to write her a script to do just that.

What I came up with was a PHP script (5.2 and up supported) designed to run as a cron task that would poll for new check-ins at a venue every 5 minutes and send an email when someone new showed up. I ended up bumping the notification interval back to 15 minutes, but there's no reason it can't support checking more often.

Later that week someone at my (semi-local) PHP User Group brought up accessing Foursquare check-in data, and I figured I might as well open source this thing. The script isn't designed with OO principles in mind or any of my other usual practices, this was just written as a (useful) proof of concept. So, without further ado, here it is:

https://github.com/fentie/FoursquareNotifier

2 comments:

  1. No one is going to be charged for notifications. That's a crazy idea that no social network can't afford to pull off. Maybe your friend got it wrong?

    anti spam software

    ReplyDelete
  2. Sprout Social isn't a social network, it's a social media monitoring tool. It aggregates data from several networks and provides reports. It's more like TweetDeck, HootSuite, or Engage121. Their site currently lists $39/mo. for the level of service she'd need to get those notifications.

    ReplyDelete