Hi, I'm working on twitter api in order to update a status. I have used successfully xauth which returns the auth_token and oauth_token_secret.

However, when I want to update a twitter status, it doesn't work...

Using this API : Authenticating Requests with OAuth | dev.twitter.com

Here's my code :
Code:
FirstAssistant.prototype.checkAccountSuccess = function(resp) {
 
 OauthToken = resp.responseText.substring(12,resp.responseText.indexOf("&"));
 
 OauthTokenSecret = resp.responseText.substring((resp.responseText.indexOf("&")+20),120); 
 
    //UPDATE TWEET STATUS ---------------------------------------------
    OuathCode = "MYCONSUMERSECRET&" + OauthTokenSecret;

   var url = "http://api.twitter.com/1/statuses/update.json";
   var postBody = "&oauth_token="+encodeURIComponent(OauthToken)+"&status="+encodeURIComponent("hello twitter !");

   
   var currentnonce = this.nonce(15);
   var timestamp = Math.floor((new Date()).getTime()/1000);      
   var token_infos = "oauth_consumer_key=" + encodeURIComponent("MYCONSUMERKEY") +
        "&oauth_nonce=" + currentnonce +
        "&oauth_signature_method=HMAC-SHA1" +
        "&oauth_timestamp=" + timestamp +
        "&oauth_token=" + OauthToken +
        "&oauth_version=1.0" +
        "&status=coucou"

 
   var base_string = "POST&" + encodeURIComponent(url) + "&" + encodeURIComponent(token_infos); 
 
   var oauth_signature = b64_hmac_sha1(OuathCode, base_string);   
   oauth_signature = encodeURIComponent(oauth_signature+"=");    

   var auth_header = 'OAuth oauth_nonce="' + currentnonce + '"' +
        ', oauth_signature_method="HMAC-SHA1"' +
        ', oauth_timestamp="' + timestamp + '"' +
        ', oauth_consumer_key="' + "MYCONSUMERKEY" + '"' +
        ', oauth_token="' + OauthToken + '"' +
        ', oauth_signature="' + oauth_signature + '"' +
        ', oauth_version="1.0"';
		
$("info").update("<br/><br/>OauthToken : " + OauthToken + "<br/><br/>OauthTokenSecret : " + OauthTokenSecret + "<br/><br/>OauthCode : " + OuathCode + "<br/><br/>base_string : " + base_string)    
 
   
     var request = new Ajax.Request(url, {
      method: 'POST',
      requestHeaders: ["Authorization", auth_header],
      postBody: postBody,
      onSuccess: this.checkAccountSuccess2.bind(this),
      onFailure: this.checkAccountFailure.bind(this)
   }); 
   
   
}
Thanks for all your help and tips !