function twitter_oauth_callback in Twitter 6.3
Same name and namespace in other branches
- 6.5 twitter.pages.inc \twitter_oauth_callback()
- 6.4 twitter.pages.inc \twitter_oauth_callback()
- 7.6 twitter.pages.inc \twitter_oauth_callback()
- 7.3 twitter.pages.inc \twitter_oauth_callback()
- 7.4 twitter.pages.inc \twitter_oauth_callback()
- 7.5 twitter.pages.inc \twitter_oauth_callback()
2 string references to 'twitter_oauth_callback'
- twitter_menu in ./
twitter.module - Implementation of hook_meu()
- twitter_signin_form_alter in twitter_signin/
twitter_signin.module - Implementation of hook_form_alter().
File
- ./
twitter.pages.inc, line 328
Code
function twitter_oauth_callback(&$form_state) {
if (isset($_GET['denied']) || empty($_GET['oauth_token'])) {
drupal_set_message(t('The connection to Twitter failed. Please try again.'), 'error');
global $user;
if ($user->uid) {
// User is logged in, was attempting to OAuth a Twitter account.
drupal_goto('user/' . $user->uid . '/edit/twitter');
}
else {
// Anonymous user, redirect to front page.
drupal_goto('<front>');
}
}
$form['#post']['oauth_token'] = $_GET['oauth_token'];
$form['oauth_token'] = array(
'#type' => 'hidden',
'#default_value' => $_GET['oauth_token'],
);
return $form;
}