jQuery.ajax() problems - timely response needed
Hello,
I am using jQuery for the first time for my new job. I'm currently working on building a Twitter integration where I call the Bit.ly API and shorten a URL. Here is my code (that literally was working a few days ago):
- jQuery.ajax({
- url: "http://api.bit.ly/v3/shorten",
- data:
- {
- longUrl: url,
- login: "removed",
- apiKey: "removed",
- format: "json"
- },
- async: false,
- dataType: "json",
- success: function (data)
- {
- if (data.status_code != 200)
- {
- alert ('There was an error, please retry construction of the tweet.');
- }
- else
- {
- shortened_url = data.data.url;
- }
- }
- });
Using Firefox with Firebug, I get a 200 OK for the request, but it gives me the error of:
Anyone have any idea WHY this wouldn't be working and how to fix this? I need a helpful nudge ASAP if possible.