twitter_actions.rules.inc in Twitter 6.5
Same filename and directory in other branches
- 6.2 twitter_actions/twitter_actions.rules.inc
- 6.3 twitter_actions/twitter_actions.rules.inc
- 6.4 twitter_actions/twitter_actions.rules.inc
- 7.6 twitter_actions/twitter_actions.rules.inc
- 7.3 twitter_actions/twitter_actions.rules.inc
- 7.4 twitter_actions/twitter_actions.rules.inc
- 7.5 twitter_actions/twitter_actions.rules.inc
Provides Rules integration in order to post tweets.
File
twitter_actions/twitter_actions.rules.incView source
<?php
/**
* @file
* Provides Rules integration in order to post tweets.
*/
/**
* Implementation of 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.
*/
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' => 'node',
'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,
);
}
Functions
Name | Description |
---|---|
twitter_actions_rules_action_info_alter | Implementation of hook_rules_action_info_alter(). |