Twitter Access Token


Hi everyone!

I’ve got an authentication problem, that i can’t understand! My code is:

$('#page-home').live('pageinit', function() {
    var oauth;
    var requestParams;
    var options = { 
                        consumerKey: 'XXXX',
                        consumerSecret: 'XXXXX',       
                        accessTokenKey: '827171780-XXXXX',
                        accessTokenSecret: 'Ec5wereDF$XXXX',    
                        callbackUrl: '' };
    var mentionsId = 0;
    var localStoreKey = "tmt5p1";



For the to request options


$('#oauthStatus').html('<span style="color:blue;">Getting authorization...</span>');
        mylog('options: '+JSON.stringify(options));
		oauth = OAuth(options);
		mylog('oauth: '+JSON.stringify(oauth));
                function(data) {
                    requestParams = data.text;
                    mylog("AppLaudLog: requestParams: " + data.text);
                            { showLocationBar : false });                    
                function(data) { 
                    alert('Error : No Authorization'); 
                    mylog("AppLaudLog: 2 Error " + JSON.stringify(data)); 
                    $('#oauthStatus').html('<span style="color:red;">Error during authorization</span>');
    mentionsId = 0;

For the token request… bu the response is always

Error 401: No authorization

What’s wrong…? Does I have to change the callbackUrl parameter?

Thank in advance



What library are you using for this? Take a look at [node:204] for some tips to try.


Hi episod,

I’m using Cordova 1.9 with Twitter e ChildBrowser plugins.

I’ve followed this useful tutorial!

But that problem remain…

It seems like oauth doesn’t authorize Twitter to use the access token…