OpenCalais API using jQuery
Posted
by
Varun
on Stack Overflow
See other posts from Stack Overflow
or by Varun
Published on 2011-01-31T07:20:41Z
Indexed on
2011/01/31
7:26 UTC
Read the original article
Hit count: 140
Hi I've wanted to do some language processing for an application and have been trying to use the OpenCalais API.
The call to the API works perfectly and returns data.
The problem is that even though I can see the data in the firebug, I cannot access it because the callback never triggers.
Details:
the call requires callback=? as it is a JSONP request. so callback=foo SHOULD call the foo method once the data is returned, it doesn't. in fact, if callback is anything other than ? the call fails and doesn't return any data. (i've also checked JSLint to make sure the returned JSON is valid).
tried using $.ajax instead of $.getJSON so that I can get an error callback, but neither the success or error callbacks fire.
in firebug, usually when you make a JSON request, the request shows up in the console. In this case, the request doesn't show up in the console, but instead shows in the "Net" tab in firebug...dunno what that means, but somehow the browser doesn't think its an XHR request.
any ideas? thanks.
© Stack Overflow or respective owner