--- /sites/all/modules/twitter/twitter.pages.inc	2011-02-25 20:07:50.405726263 +0530
+++ /sites/all/modules/twitter/twitter.pages.inc	2011-02-25 20:09:53.857739294 +0530
@@ -308,6 +308,7 @@ function twitter_account_oauth_validate(
 
   $_SESSION['twitter_oauth']['token'] = $token;
   $_SESSION['twitter_oauth']['destination'] = $_GET['q'];
+  $_SESSION['twitter_oauth']['uid'] = $form['uid']['#value'];
   drupal_goto($twitter->get_authorize_url($token));
 }
 
@@ -356,7 +357,8 @@ function twitter_oauth_callback_submit(&
   $twitter = new TwitterOAuth($key, $secret, $response['oauth_token'], $response['oauth_token_secret']);  
   $account = $twitter->users_show($response['screen_name']);
   $account->set_auth($response);
-  twitter_account_save($account, TRUE);
+  $owner = user_load($form_state['twitter_oauth']['uid']);
+  twitter_account_save($account, TRUE, $owner);
   $form_state['redirect'] = $form_state['twitter_oauth']['destination'];
   $form['#programmed'] = FALSE;
 }
