Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
create new Twitter instance when OAuth process has been canceled
Browse files Browse the repository at this point in the history
  • Loading branch information
takuo committed Feb 26, 2011
1 parent f25ea21 commit d95a63f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/jp/takuo/android/ojiichan/Main.java
Expand Up @@ -187,8 +187,13 @@ protected Void doInBackground(String... params) {
}

@Override
protected void onActivityResult(int requestCode, int resutCode, Intent data) {
if(requestCode == REQUEST_CODE) isAuthed();
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if(requestCode == REQUEST_CODE && resultCode == RESULT_OK) isAuthed();
else if (resultCode == RESULT_CANCELED) {
mTwitter.shutdown();
mTwitter = new TwitterFactory().getInstance();
mTwitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_SEC);
}
}

private void isAuthed() {
Expand Down

0 comments on commit d95a63f

Please sign in to comment.