I use XmlHTTPRequest in JavaScript (actually, i write Google Chrome
Api successfully gives me all the tokens (i use oAuth OOB) the twitter
returns me a PIN code, then it successfully changed to acces token,
and on the final stage - attemp to update status it doesnt return any
response (((
I try to send Authorization header (i think, all right with it), and i
try to send authorization fields directly in POST body, but nothing ((

My code is :

message = {method: "post", action: accessor.serviceProvider.actionURL,
parameters: [["status","Yahoo"]]};
var requestBody = OAuth.formEncode(message.parameters);
{ consumerKey   : accessor.consumerKey
, consumerSecret: accessor.consumerSecret
, token         : token
, tokenSecret   : token_secret
var authorizationHeader = OAuth.getAuthorizationHeader("",
var requestAction = new XMLHttpRequest();
requestAction.onreadystatechange = function() {
if (requestAction.readyState == 4) {
alert(requestAction.status+" "+requestAction.statusText
requestAction.open(message.method, message.action, true);
requestAction.setRequestHeader("Authorization", authorizationHeader);
requestAction.setRequestHeader("Content-Type", "application/x-www-form-

Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 

Reply via email to