Skip to content

Instantly share code, notes, and snippets.

@LaurMo
Created February 24, 2014 18:31
Show Gist options
  • Save LaurMo/9194053 to your computer and use it in GitHub Desktop.
Save LaurMo/9194053 to your computer and use it in GitHub Desktop.
instagram api
got it work sans plug in
$.ajax({
type: "GET",
dataType: "jsonp",
cache: false,
url: "https://api.instagram.com/v1/tags/" + 'budlight' + "/media/recent?client_id=" + '41e187d89f4b42b784804e0981f30c11',
success: function(response) {
var length = response.data != 'undefined' ? response.data.length : 0;
var limit = 60 != null && 60 < length ? 60 : length;
if(limit > 0) {
for(var i = 0; i < limit; i++) {
$('<img>', {
src: response.data[i].images.standard_resolution.url
}).appendTo($("#photos"));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment