You are here

function twitter_actions_set_status_action_submit in Twitter 6.3

Same name and namespace in other branches
  1. 6.5 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_submit()
  2. 6.2 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_submit()
  3. 6.4 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_submit()
  4. 7.6 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_submit()
  5. 7.3 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_submit()
  6. 7.4 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_submit()
  7. 7.5 twitter_actions/twitter_actions.module \twitter_actions_set_status_action_submit()

Implements hook_actions_set_status_action_submit()

File

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

Code

function twitter_actions_set_status_action_submit($form, $form_state) {
  $form_values = $form_state['values'];
  $twitter_uid = db_result(db_query("SELECT twitter_uid FROM {twitter_account} WHERE screen_name = '%s'", $form_values['screen_name']));

  // Process the HTML form to store configuration. The keyed array that
  // we return will be serialized to the database.
  $params = array(
    'twitter_uid' => $twitter_uid,
    'screen_name' => $form_values['screen_name'],
    'message' => $form_values['message'],
  );
  return $params;
}