I'm new to Twitter API and I try to create an easy jQuery script which
allows me to load the userprofile data (http://dev.twitter.com/doc/get/
account/verify_credentials). I already requested the oauth_token and
the oauth_token_secret (with php).

But I don't know the purpose of the oauth_token and the
oauth_token_secret. I tried to make a code with which I have access to
Twitter API. (I use this md5 jQuery plugin: 

Can someone help me to get along with Twitter API and jQuery.

My jQuery code:

      function microtime(get_as_float) {
        var now = new Date().getTime() / 1000;
        var s = parseInt(now, 10);
        return (get_as_float) ? now : (Math.round((now - s) * 1000) /
1000) + ' ' + s;

      function nonce() {
        var mt = microtime(true);
        var rand = mt_rand();
        var md5_hash = $.md5(mt + rand); // md5 jQuery Plugin
        return md5_hash;

      // API settings
      var access_token = "14152914-
      var consumer_key = "UVITPP0P9C0Ab1XoaiyRqQ";
      var signature = "HMAC-SHA1";

      // API call
      var tw_api_url = "http://api.twitter.com/1/account/

      $.post(tw_api_url, function(json) {
      }, "json");

Thanks in advance for your help,


Reply via email to