当我在我的应用程序上发布时,我收到以下身份验证错误。
10-07 15:36:54.265: E/AndroidRuntime(2537): FATAL EXCEPTION: Thread-199
10-07 15:36:54.265: E/AndroidRuntime(2537): winterwell.jtwitter.TwitterException$E401: code 215: Bad Authentication data
10-07 15:36:54.265: E/AndroidRuntime(2537): at winterwell.jtwitter.URLConnectionHttpClient.processError(URLConnectionHttpClient.java:483)
10-07 15:36:54.265: E/AndroidRuntime(2537): at winterwell.jtwitter.URLConnectionHttpClient.post2_connect(URLConnectionHttpClient.java:413)
10-07 15:36:54.265: E/AndroidRuntime(2537): at winterwell.jtwitter.URLConnectionHttpClient.post2(URLConnectionHttpClient.java:379)
10-07 15:36:54.265: E/AndroidRuntime(2537): at winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:348)
10-07 15:36:54.265: E/AndroidRuntime(2537): at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2762)
10-07 15:36:54.265: E/AndroidRuntime(2537): at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2694)
10-07 15:36:54.265: E/AndroidRuntime(2537): at winterwell.jtwitter.Twitter.setStatus(Twitter.java:2482)
10-07 15:36:54.265: E/AndroidRuntime(2537): at com.example.yamba.StatusActivity$1.run(StatusActivity.java:31)
当我尝试从 webbrowser 登录到 twitter.com 时,提供的凭据起作用。
我的代码:
public void onClick(View v) {
final String statusText = editStatus.getText().toString();
new Thread(){
public void run(){
Twitter twitter = new Twitter("username", "password");
twitter.setStatus(statusText);
}
}.start();
}
微博版本:2.9.0