Skip to content

Instantly share code, notes, and snippets.

@aaronmoodie
Created August 24, 2010 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronmoodie/546730 to your computer and use it in GitHub Desktop.
Save aaronmoodie/546730 to your computer and use it in GitHub Desktop.
function getImages(setID) {
$.getJSON("http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&api_key=yourKeyhere8&photoset_id=" + setID + "&lang=en-us&format=json&jsoncallback=?", displayImages);
}
function displayImages(data) {
var htmlString = "";
$.each(data.photoset.photo, function(i,photo){
var imgSrc = 'http://farm' + photo.farm + '.static.flickr.com/' + photo.server + '/' + photo.id + '_' + photo.secret + '_b.jpg';
htmlString += '<img title="' + photo.title + '" src="' + imgSrc;
htmlString += '" alt="'; htmlString += photo.title + '" />';
});
$('#images').html(htmlString);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment