Skip to content

Instantly share code, notes, and snippets.

@simonkim
Created August 21, 2013 10:56
Show Gist options
  • Save simonkim/6293029 to your computer and use it in GitHub Desktop.
Save simonkim/6293029 to your computer and use it in GitHub Desktop.
4sq venue search api
<div id="names">
</div>
<script>
var query = escape('coffeingurunaru');
$.getJSON('https://api.foursquare.com/v2/venues/search?intent=global&query='
+ query
+ '&client_id=2POUFAUU4ZBJ2MTDOY3S2YHR2NIT52FYW0LUTPHBMNTJFJNQ&client_secret=YFDZI1YWV3ZI5S5SPM2DZJEQIEBPIDJ5XFZBWTIKIQZVQNYM&v=20120101',
function(data) {
$.each(data.response.venues, function(i,venues){
content = '<p>' + venues.name + '</p>';
$(content).appendTo("#names");
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment