-
-
Save lilyszajn/1293193 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 apikey = "2794b427c3570f8b21835f18368f407a" | |
| var photoid = "results.doc.photoid" | |
| var flickrUrl = "http://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+ apikey+"&photo_id="+ "6254305259" +"&format=json&jsoncallback=?" | |
| $(window).load(function () { | |
| $.getJSON(flickrUrl, function(data){ | |
| // console.log(data.sizes.size[3].source); | |
| console.log(data); | |
| console.log(results.doc) | |
| //var results = data.rows; | |
| // for(i data.rows) | |
| addy = data.sizes.size[1].source | |
| $('#photos').html('<img src = "' + addy + '"/>'); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment