0

モバイル アプリで Twitter にツイートを投稿しようとしています。アプリにリンクされた Twitter ページにログインして、アカウントを承認しました。

投稿すると、「公開されていません」というアラートが表示されます。

誰も理由を知っていますか?

これが私のコードです:

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);
    }
});
4

1 に答える 1

0

これは解決しました。何が悪かったのかわかりません。

おそらく、私はまだキャッシングなどをしていたのでしょう。

于 2011-07-28T10:09:42.670 に答える