function twitter_account_form_submit in Twitter 6.3
Same name and namespace in other branches
- 6.4 twitter.pages.inc \twitter_account_form_submit()
- 7.3 twitter.pages.inc \twitter_account_form_submit()
- 7.4 twitter.pages.inc \twitter_account_form_submit()
Implements hook_FORM_ID_submit()
Loads Twitter account details and adds them to the user account
File
- ./
twitter.pages.inc, line 305
Code
function twitter_account_form_submit($form, &$form_state) {
module_load_include('inc', 'twitter');
$name = $form_state['values']['screen_name'];
$twitter = new Twitter($name);
$account = $twitter
->users_show($name, false);
twitter_account_save($account, TRUE, user_load($form_state['values']['uid']));
}