I create a Flickr account, create an app and got my API key, created a few photo sets and tested the API call using their API explorer to get the following URL to call:
In the browser this works great, but calling this via jQuery returns absolutely nothing - checked it using FireBug.
Here is my jQuery code:
var url = 'http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=78ac01418165186ee9be695c61a5d53f&user_id=21466829%40N07&format=json';
$.getJSON(url, function (data) {
var list = $("<ul></ul>");
$.each(data.photosets.photoset, function (i, set) {
var link = $("<a/>").attr("title", set.description._content)
.attr("href", "http://www.flickr.com/photos/mjryall/sets/" + set.id)
.text(set.title._content);
var li = $("<li/>").append(link).append(" (" + set.photos + ")");
$(list).append(li);
});
$("#flickr-sets").append(list);
});
I have also set the website, tag and permissions to public for this app. This should be a no brainer - what am I missing here?