function twitter_oauth_callback in Twitter 7.4
Same name and namespace in other branches
- 6.5 twitter.pages.inc \twitter_oauth_callback()
- 6.3 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.5 twitter.pages.inc \twitter_oauth_callback()
Wrapper to call drupal_form_submit() which wasn't required in D6.
1 string reference to 'twitter_oauth_callback'
- twitter_menu in ./
twitter.module - Implements hook_menu().
File
- ./
twitter.pages.inc, line 365 - Page callbacks for Twitter module.
Code
function twitter_oauth_callback() {
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_state['values']['oauth_token'] = $_GET['oauth_token'];
drupal_form_submit('twitter_oauth_callback_form', $form_state);
}