English 中文(简体)
如何在安乐斯派一名前eet?
原标题:How to send a tweet with jTwitter on Android?

是否有任何人通过 Android子在安乐斯成功地寄出一个tw子?

我对澳大利亚的认可感到困惑。 我可以成功地将用户转往前线,授权我用<条码>新版的OAuthSignpostClient(CONSUMER_KEY,CONUMER_SECRET, CALLBACK_URL)发送我的照片。 接着,我储存了<代码>oauth_token和oauth_verifier<>/code>,这些编号与《欧洲公路货运公约》一起提供,并试图再次使用欧航站更新:

OAuthSignpostClient client = new OAuthSignpostClient(TwitterOAuthActivity.CONSUMER_KEY, TwitterOAuthActivity.CONSUMER_SECRET, accessToken, accessTokenSecret);

// Ready to go!
Twitter twitter = new Twitter(null, client);
CharSequence date = DateFormat.format("dd.MM.yyyy @ hh:mm:ss", new Date());
twitter.updateStatus("Yay. It works! " + date);

终止日期:

05-11 12:24:32.643: E/AndroidRuntime(25897): winterwell.jtwitter.TwitterException$E401: Could not authenticate with OAuth.
05-11 12:24:32.643: E/AndroidRuntime(25897): http://api.twitter.com/1/statuses/update.json (anonymous)
05-11 12:24:32.643: E/AndroidRuntime(25897):    at winterwell.jtwitter.URLConnectionHttpClient.processError(URLConnectionHttpClient.java:425) 
05-11 12:24:32.643: E/AndroidRuntime(25897):    at winterwell.jtwitter.OAuthSignpostClient.post2_connect(OAuthSignpostClient.java:345)

Does anyone has an idea where my Problem is?

问题回答

背风机是临时钥匙。 它请你把你所持有的奥阿瑟特尼塔反对锁定下来。 你们可以利用它来建造一个新的乌特森卡利特。

你们需要呼吁:

client.setAuthorizationCode(verifier);
// The client can now be used!
// To use it again, without the oauth dance, store _these_ tokens:
String[] tokens = client.getAccessToken();

您也不妨检查新的安妮特维特·洛辛班,使情况容易:

AndroidTwitterLogin atl = new AndroidTwitterLogin(myApp, 
                MY_TWITTER_KEY,MY_TWITTER_SECRET,MY_TWITTER_CALLBACK) {                 

    protected void onSuccess(Twitter jtwitter, String[] tokens) {
        jtwitter.setStatus("I can now post to Twitter!");
        // Recommended: store tokens in your app for future use
        // with the constructor OAuthSignpostClient(String consumerKey, String consumerSecret, String accessToken, String accessTokenSecret)
    }
};
atl.run();




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...