tags:

views:

47

answers:

1

I have this JQuery expression

$.getJSON("http://api.flickr.com/services/feeds/photoset.gne?set=72157607523855079&nsid=9298216@N08&lang=en-us&format=json&jsoncallback=?", function(data){
  $.each(data.items, function(i,item)
  {
  $("<img/>").attr("src", item.media.m).appendTo("#images").wrap("<a href='" + item.link + "'></a>");
});

Which pulls the appropriate images from my Flickr acccount, but how do I get and the image title and the image "content"?

+2  A: 

You need to provide the extra options that you want to retrieve as a parameter to the API call for things other than the title. The title seems to be provided by default, so you'd refer to it as item.title. See the documentation at Flickr. You might also want to look at the returned data in Firefox/Firebug if you have further questions about the structure of the returned objects.

$.getJSON("http://api.flickr.com/services/feeds/photoset.gne?'
   + 'set=72157607523855079&nsid=9298216@N08&lang=en-us'
   + '&extras=tags,media,date_taken'
   + '&format=json&jsoncallback=?", ...
tvanfosson