diff --git a/twitter_actions/twitter_actions.rules.inc b/twitter_actions/twitter_actions.rules.inc
index a57dbb9..6ccd539 100644
--- a/twitter_actions/twitter_actions.rules.inc
+++ b/twitter_actions/twitter_actions.rules.inc
@@ -5,25 +5,37 @@
  */
 
 /**
- * Implements hook_rules_action_info_alter().
- *
- * Actions of type system are not supported, so rules won't make use of it automatically. So
- * we have to provide some information about it to make it work.
+ * Implements hook_rules_action_info() on behalf of the twitter module.
  */
-function twitter_actions_rules_action_info_alter(&$actions) {
-  $actions['rules_core_twitter_actions_set_status_action'] = array(
-    'label' => t('Post a message to Twitter'),
-    // Make sure there is something passed for $object.
-    'arguments' => array('object' => array(
-        'type' => 'value',
-        'default value' => NULL,
-      )),
-    'module' => 'Twitter',
-    'eval input' => array('screen_name', 'password', 'message'),
-    // Let the rules system for executing core style actions execute it.
-    'base' => 'rules_core_action_execute',
-    'action_name' => 'twitter_actions_set_status_action',
-    'configurable' => TRUE,
+function twitter_actions_rules_action_info() {
+  return array(
+    'rules_core_twitter_actions_set_status_action' => array(
+      'label' => t('Post a message to Twitter'),
+      'group' => t('Twitter'),
+      'parameter' => array(
+        'message' => array(
+          'type' => 'text',
+          'label' => t('Message'),
+          'description' => t("The content of the tweet."),
+        ),
+        'sender' => array(
+          'type' => 'user',
+          'label' => t('Sender'),
+          'description' => t("User whose Twitter account will be used."),
+        ),
+      ),
+      'base' => 'rules_action_set_status',
+    ),
   );
 }
 
+function rules_action_set_status($message, $sender) {
+  if ($twitter_uid = db_query("SELECT twitter_uid FROM {twitter_account} WHERE uid = :uid", array(':uid' => $sender->uid))->fetchField()) {
+    module_load_include('inc', 'twitter');
+    $twitter_account = twitter_account_load($twitter_uid);
+    twitter_set_status($twitter_account, $message);
+  }
+  else {
+    drupal_set_message(t('Twitter authentication failed. Please check your account name and try again.'), 'error');
+  }
+}
