You are here

function twitter_actions_set_status_action_validate in Twitter 6.2

Same name and namespace in other branches
  1. 6.3 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_validate()
  2. 7.3 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_validate()

File

twitter_actions/twitter_actions.module, line 98
Exposes Drupal actions for sending Twitter messages.

Code

function twitter_actions_set_status_action_validate($form, $form_state) {
  module_load_include('inc', 'twitter');
  $verify = FALSE;
  $pass = $form_state['values']['password'];
  $name = $form_state['values']['screen_name'];
  module_load_include('inc', 'twitter');
  $valid = twitter_authenticate($name, $pass);
  if (!$valid) {
    form_set_error('password', t('Twitter authentication failed. Please check your account name and try again.'));
  }
}