jQuery Twitter API plugin

I have released a simple Twitter public API for jQuery. Code and examples are open source and can be download here : http://code.google.com/p/jquery-twitter-api/. NB : informations requiring authentication are not accessible to JavaScript inside classical Web pages because of the same origin policy restriction. Thus this plugin is only intended to access publicly available data.

Tags: , ,

This entry was posted on Saturday, July 11th, 2009 at 3:02 pm and is filed under JavaScript. You can follow any comments to this entry through the RSS 2.0 feed. You can leave a comment, or trackback from your own site.

5 comments

  1. Comment 35

    Karl Böhlmark

    You’re right about the initialization, it’s perfectly correct as it stands.
    The thing is, I tried the test-method from the usage example: $.twitter.test(printSuccess);
    and it didn’t work, so I had a look at the code, made the two changes, and then it worked. I think the problem was when you do $.each(options,.. and options is undefined. (Which it is in the usage example) jQuery then tries to do options.length and you have a problem.

    I just put in an if(options)… and then it worked.

    I’m still not testing this to verify what I’m saying here, but I’m pretty sure I’m right :-)

  2. Comment 32

    Karl Böhlmark

    Thanks a lot for the plugin, it’s just what I needed :-) .

    However I had to fix it a little bit to make it work. There seems to be a comma instead of a semi-colon on line 146. And also on line 151 there is a problem if the options parameter isn’t set.

    Just wanted to let you know. Thanks again!

    • Comment 34

      @Karl It’s great if it helps. The coma should really be a coma on line 146, it’s a simple initialization of two variables using one var statement :

      var a = [], b = {};

      If the coma is replaced by a semicolon b becomes a global variable.

      Could you take time to tell me what problem you noticed in line 151 ?

Leave a comment