Twitter signature in javascript(chrome extension)


#1
manifest:
{
  "name": "jQuery DOM",
  "version": "1",
  "manifest_version": 2,
  "description": "Manipulate the DOM when the page is done loading",
  "background_page": "background.html",
  "browser_action": {
    "name": "Manipulate DOM",
    "icons": ["icon.png"],
    "default_icon": "icon.png"
  },
  "content_scripts": [ {
    "js": [ "jquery.min.js", "background.js" ],
    "matches": [ "http://*/*", "https://*/*"]
  }]
}

background.js:

var time = new Date().getTime();

var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }



xmlhttp.open("POST","https://api.twitter.com/oauth/request_token",true);
xmlhttp.setRequestHeader("oauth_callback","http://127.0.0.1:81");
xmlhttp.setRequestHeader("oauth_consumer_key","1xFLKhdwNEz3xfXXXXXXXXXXX");
xmlhttp.setRequestHeader("oauth_nonce",time);
xmlhttp.setRequestHeader("oauth_signature_method","HMAC-SHA1");
xmlhttp.setRequestHeader("oauth_timestamp",time);
xmlhttp.setRequestHeader("oauth_version","1.0");

xmlhttp.send();

I already request token successfully but
how to attach signature in javascript also any errors above ???