When you logging in with twitter from login page (for example /user/login?destination=node) you getting "You are not authorized to access this page." at the same page (/user/login?destination=node).
I.e. redirect to destination does not work.

Maybe we need something like this

  $p_url = parse_url(referer_uri());
  parse_str($p_url['query'], $params);
  $_SESSION['twitter_oauth']['destination'] = (isset($params['destination']))?$params['destination']:referer_uri();

at function twitter_signin_redirect()

Comments

foxfabi’s picture

i have changed the end of twitter_signin_oauth_callback_submit

  if (!$success) {
    $_SESSION['twitter']['values'] = $response;
    drupal_goto('user/register');
+  } else {
+    drupal_goto('user/'.$account->uid);
  }
pingwin4eg’s picture

goto doesn't give a chance to insert a record to 'twitter_account' table

juampynr’s picture

Status: Active » Postponed (maintainer needs more info)

I have found many warning alerts in this version during a Twitter sign in attempt (6.x-3.0-beta2), fixed at #1211916: Bugs with " sign in twitter" module.

Have you considered upgrading to the latest stable version? http://drupal.org/project/twitter

juampynr’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

Actually, I am marking it as duplicate as I can verify that these errors are not present in the latest stable version.

#1211916: Bugs with " sign in twitter" module

pelicani’s picture

I am finding this is still a drupal 6 issue.
the dv7 version is built differently and does appear to have a solution.
I believe this issue is actually a duplicate of http://drupal.org/node/671212
hope this is correct and we can get a solution for 6

pelicani’s picture

we are going to hard code the location of our home page into the session variable for the destination.
if anyone has a better solution, please post it and share.

note: i tried to use the destination variable in the query string, but the authorization was skipped every time.