jQuery $.getJSON - How do I parse a flickr.photos.search REST API call?

后端 未结 4 908
借酒劲吻你
借酒劲吻你 2021-01-31 06:15

Trying to adapt the $.getJSON Flickr example:

$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jso         


        
4条回答
  •  情歌与酒
    2021-01-31 06:50

    This could be simplified by choosing the 'url_m' extras parameter and per_page parameter...

    extras=url_m&per_page=4
    

    Then all you need is this within the loop...

    $("").attr("src", item.url_m).appendTo("#images");
    

提交回复
热议问题