Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Created October 17, 2011 16:12
Show Gist options
  • Select an option

  • Save atduskgreg/1292973 to your computer and use it in GitHub Desktop.

Select an option

Save atduskgreg/1292973 to your computer and use it in GitHub Desktop.
example of getting a flickr photo url with jquery from the id
var api_key = "my api key"
var photoid = "my photo id, from cakemix, i.e. result.doc.photo_id or something"
var flickrUrl = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+ api_key+"&photo_id="+ photoid +"&format=json&jsoncallback=?"
$.getJSON(flickrUrl, function(data){
console.log(data.sizes.size[5].source);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment