api - How to retrieve the last check-in with picture from Foursquare, knowing nothing about OAuth? -
i'm trying last check-in picture foursquare apis, following data:
- venue name;
- date , time of check-in;
- picture url;
- check-in url on foursquare.com.
fortunately or not, am:
- able use jquery's
$.getjson
retrieve data public/open apis (i.e. last shot on dribbble, last song on last.fm, or last picture on instagram); - not able code oauth application, because miserably fail understand oauth every time try learn it.
here's i've done:
- created app on
foursquare.com/developers/apps
, have client id , client secret; - tried throwing both client id , secrets
&.getjson
request , quietly expected work, like:
var url1 = "https://api.foursquare.com/v2/users/self/checkins?client_id=xxx&client_secret=xxx", url2 = "https://api.foursquare.com/v2/users/self/checkins?oauth_token=xxx&v=20130718" $.getjson(url1, function(data) { console.log(data); }); $.getjson(url2, function(data) { console.log(data); });
of course nothing works, , maybe because i'm not getting how oauth works , have authenticate request. tried (many times) read oauth documentation, low literacy in these matters not @ all. bottom line: how last check-in picture, poor understanding of oauth? maybe js/php library simplify process (and i'd appreciated if suggest one), i'd understand how works.
the users/self/checkins endpoint you're trying use isn't possible through userless access (which you're trying url1
), means, better or worse, you'll have use oauth.
oauth user giving application permission access user's data on foursquare. through process describe on our page on connecting, you're able obtain access_token
us, need pass each call our api. if documentation technically dense, perhaps try using existing oauth library or up-and-coming "oauth-as-a-service" solutions. if you're getting stuck @ specific point in auth process, feel free email api (at) foursquare (dot) com , we'll our best through.
Comments
Post a Comment