Getting Gowalla Check-in history using API?

You can use their API Explorer to see what's available in terms of the API. It's pretty neat and serves as nice documentation, just look at the REST style URLs Here's basic code to get the last 5 checkins. You will need an API Key $username = 'sco'; $api_key = 'f6cd524ac9c4413abfb41d7123757d9'; $checkin_num = 5; $url = "api.gowalla.com/users/{$username}/stamps...; // setup curl $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array ( "Accept: application/json", "X-Gowalla-API-Key: {$api_key}", )); $body = curl_exec($ch); curl_close($ch); $json = json_decode($body, true); foreach($json'stamps' as $stamp) { print $stamp'spot''name' .''; print ""; print_r($stamp); print ""; } Here's what a checkin stamp object looks like: Array ( spot => Array ( image_url =>

url => /spots/19890 lat => 38.9989524833 address => Array ( locality => Kansas City region => MO ) lng => -94.5939345333 name => The GAF Pub & Grille ) first_checkin_at => 2010-06-12T19:16:57+00:00 checkins_count => 1 last_checkin_at => 2010-06-12T19:16:57+00:00 ).

You can use their API Explorer to see what's available in terms of the API. It's pretty neat and serves as nice documentation, just look at the REST style URLs. Here's basic code to get the last 5 checkins.

You will need an API Key. $username = 'sco'; $api_key = 'f6cd524ac9c4413abfb41d7123757d9'; $checkin_num = 5; $url = "api.gowalla.com/users/{$username}/stamps...; // setup curl $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array ( "Accept: application/json", "X-Gowalla-API-Key: {$api_key}", )); $body = curl_exec($ch); curl_close($ch); $json = json_decode($body, true); foreach($json'stamps' as $stamp) { print $stamp'spot''name' . ''; print ""; print_r($stamp); print ""; } Here's what a checkin 'stamp' object looks like: Array ( spot => Array ( image_url =>

url => /spots/19890 lat => 38.9989524833 address => Array ( locality => Kansas City region => MO ) lng => -94.5939345333 name => The GAF Pub & Grille ) first_checkin_at => 2010-06-12T19:16:57+00:00 checkins_count => 1 last_checkin_at => 2010-06-12T19:16:57+00:00 ).

Awesome, thank you very much. – seanmetzgar Jun 13 '10 at 2:31 Glad to help. Welcome to StackOverflow!

– artlung Jun 13 '10 at 2:39 This gives you the "stamps" - you have one stamp for every distinct location you've checked in at. This doesn't however give you each checkin - also it doesn't give you the message associated with the checkin. – ibz Sep 16 at 1:03 Right ibz, the answer is geared toward how to use PHP and cURL to get at the data, and I also refer the questioner to the API Explorer so he can get a sense of the different data that's available.

If you feel like my answer needs edits or clarifications, please feel free to add! Thank you. – artlung Sep 16 at 14:53 @artlung Don't know what the original intent of the question was - if it was about how to call Gowalla API from PHP, then your answer is great.

However I came to this question hoping I can find a way to get the actual checkins - which seems impossible to do by using the API calls described in the API explorer. :( Yes, I found a way to do it after all, and posted the answer here. – ibz Sep 20 at 6:53.

Use api.gowalla.com/users/USERNAME/events to get all checkins for a user. Use the page parameter to get results beyond the first page. Don't forget to pass the Accept header with the application/json value, or Gowalla will simply return 500 error.

Bwah, Gowalla just released version 4 - old API still works but doesn't seem to catch checkins created on version 4 clients! – ibz Oct 7 at 4:41.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions