I'm about to rip out my eyes and eat them. I'm trying to pull data from flickr and apparently I have no idea what I'm doing.
This works:
var flickrAPI = "https://api.flickr.com/services/rest/api_key=xxxxx";
$.get(flickrAPI,
{
method: "flickr.photosets.getList",
format: "json",
user_id: "xxxxx"
}, alert("ok")
);
And I am alerted "ok" However when I try to use function() {} in place of alert()...
var flickrAPI = "https://api.flickr.com/services/rest/api_key=xxxxx";
$.get(flickrAPI,
{
method: "flickr.photosets.getList",
format: "json",
user_id: "xxxxx"
}, function(data) {alert("ok");}
);
Nothing happens.
Also, if I assign the return value of $.get to a variable, I'm left with the following JSON object:
{"readyState" : "1"}
which is not what I'm looking for. any ideas? It might be worth noting that the html file I'm working with is a local file.
Thanks