Tweets not published in mobile app

You must Login before you can answer or comment on any questions.

Hello,

I am trying to post a tweet on twitter with my mobile app. I have authorized my account by logging in on the twitter page linked to my app.

Now when i post it gives a 'Not published' alert.

Does anyone know the reason?

Here is my code:

submit.addEventListener('click', function(){
    var oAuthAdapter = new OAuthAdapter('SECRET KEY', 'KEY', 'HMAC-SHA1');
 
    // load the access token for the service (if previously saved)
    oAuthAdapter.loadAccessToken('twitter');
 
    oAuthAdapter.loadAccessToken('twitter');
 
    oAuthAdapter.send('https://api.twitter.com/1/statuses/update.json', [['status', 'Test from appcelerator ' + Math.random()]], 'Twitter', 'Published.', 'Not published.');
 
    if (oAuthAdapter.isAuthorized() == false) {
        // this function will be called as soon as the application is authorized 
        var receivePin = function(){
            // get the access token with the provided pin/oauth_verifier
            oAuthAdapter.getAccessToken('https://api.twitter.com/oauth/access_token');
            // save the access token
            oAuthAdapter.saveAccessToken('twitter');
        };
        // show the authorization UI and call back the receive PIN function 
 
        oAuthAdapter.showAuthorizeUI('https://api.twitter.com/oauth/authorize?' +
        oAuthAdapter.getRequestToken('https://api.twitter.com/oauth/request_token'), receivePin);
    }
});

— asked 4 years ago by Tjeu Vdw
0 Comments

3 Answers

Dumb question, but you're changing the keys, right?

Also, there was an updated version that works better, I was having issues with the older oauth adapter.

Yeah, I changed the keys :) Which one are you using? Maybe that could to the trick?

I can log in perfectly and all, but the only problem is the posting of the tweet. Always gives 'Not Published' alert.

— answered 4 years ago by Tjeu Vdw
answer permalink
2 Comments
  • I used the latest version, 1.6 I think it was.

    Is this iOS or android? Don't think it works on Android as of now.

    — commented 4 years ago by Josh Lewis

  • I just updated mine to the 1.6 and now it works just fine, thanks!

    — commented 4 years ago by Tjeu Vdw

Your Answer

Think you can help? Login to answer this question!