Oauth 1.3.7 fetchRequestToken not working in android device

javascript

#1

Hi everyone,

I created a twitter client app using oauth protocol. In windows phone, app is fetching the request token and retrieving the tweets. But in android device, not able to fetch token. Receiving the error {“text”:"", “xml”:"", requestHeaders": {}, “responseHeaders”: {shouldInterceptRequest}}. I am using the same code for both platforms.

I used the following code for fetching token:

var oauth = OAuth({
consumerKey: "YOUR CONSUMER KEY", 
consumerSecret: "YOUR CONSUMER SECRET", 
accessToken: "YOUR ACCESS TOKEN ", 
accessTokenSecret: "YOUR ACCESS TOKEN SECRET",
callbackUrl: "http://twitter.com",
requestTokenUrl: "https://api.twitter.com/oauth/request_token",
authorizationUrl: "https://api.twitter.com/oauth/authenticate",
accessTokenUrl: "https://api.twitter.com/oauth/access_token"
});


function onLoad() {
oauth.fetchRequestToken(function (url) {
    alert("Opening Request Token URL: " + url);
    Login(url);
}, function (data) {
    alert(JSON.stringify(data));

});

Anyone knows the solution, please help me.

Thanks,