jQuery.ajax() problems - timely response needed

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):

  1. jQuery.ajax({
  2. url: "http://api.bit.ly/v3/shorten",
  3. data: 
  4. {
  5. longUrl: url,
  6. login: "removed",
  7. apiKey: "removed",
  8. format: "json"
  9. },
  10. async: false,
  11. dataType: "json",
  12. success: function (data)
  13. {
  14. if (data.status_code != 200)
  15. {
  16. alert ('There was an error, please retry construction of the tweet.');
  17. }
  18. else 
  19. {
  20. shortened_url = data.data.url;
  21. }
  22. }
  23. });
Using Firefox with Firebug, I get a 200 OK for the request, but it gives me the error of:

  1. data is null.
Anyone have any idea WHY this wouldn't be working and how to fix this? I need a helpful nudge ASAP if possible.