Ok i see i'm missing json knowledge. Thanks anyway.
Phil
Emil Ivanov wrote:
Hi,
Actually, it very simple:
Flickr gives you something like this:
jsonFlickrApi({
"stat": "ok",
"blogs": {
"blog": [
{
"id" : "73",
"name" : "Bloxus test",
"needspassword" : "0",
"url" : "http://remote.bloxus.com/"
},
{
"id" : "74",
"name" : "Manila Test",
"needspassword" : "1",
"url" :
"http://flickrtest1.userland.com/"
}
]
}
});
all you need to do is define the jsonFlickrApi function. For example:
function jsonFlickrApi(data) {
return data;
}
After you eval the response you'll have this function called and it
will give you the data.
(Note: I haven't tested this, so it might contain errors, but you can
see the point).
Regards,
Emil Ivanov
Then you can just use $.get and have the
On May 31, 1:08 am, philguillard <[EMAIL PROTECTED]> wrote:
Hi all,
I use $.getJSON with flickr REST API, unfortunately flickr is answering:
jsonFlickrApi({"photos":{"page":1, "pages":10, "perpage":100,
"total":"938", "photo":[{"id":"
I guess i should remove "jsonFlickrApi(" header to get the json
interpreted. So i tried:
$.get(url, function(response){
response = response.split("jsonFlickrApi(")[1];
response= response.substr(0,response.length-1);
//var json = JSON.parse(response);
}
but don't knoe how to parse the remaining data as an object
Somebody can help?
Regards,
Phil