JQuery / Flickr API issue with get Photo set

守給你的承諾、 提交于 2019-12-03 17:32:59

It's because you're trying to use the api feed as if it were an rss feed. they are two different formats. Take a look at the flickr api browser for photosets.getPhotos

This code should get you going:

$.getJSON(url, function(data) {
    $.each(data.photoset.photo, function(i,item){
    var squareUrl = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_s.jpg';
    var largeUrl = squareUrl.replace('_s.jpg', '_b.jpg');
});

Try this code its working and please change the credentials after your testing is complete...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!