Created
October 17, 2011 16:12
-
-
Save atduskgreg/1292973 to your computer and use it in GitHub Desktop.
example of getting a flickr photo url with jquery from the id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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