tinorusch/tweeter

AddOn for SallyCMS, providing capability of tweeting formatted events.

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Type:sallycms-addon

dev-default 2013-06-20 08:19 UTC

This package is auto-updated.

Last update: 2020-08-08 16:46:12 UTC


README

Tweets events from SallyCMS.

To create consumerKey etc. go to https://dev.twitter.com/apps/new and create your credentials with read/write access.

An example config is given below:

tweeterConfig: consumerKey: consumerSecret: accessToken: accessTokenSecret: events:

- eventName: 'SLY_ART_ADDED'
  pattern: 'New Article added to testsite.de: %s'
  keys:
    - ['name']

It registers a Tweeter-Listener to the 'SLY_ART_ADDED' event. If this event occurs, we format the text given by 'pattern' with the $params given by the event. 'keys' contains a ordered list of key-lists. The key ['name'] refers to $params['name']. The key ['user','name'] would refer to $params['user']['name']. 'pattern' is in standard sprintf syntax.

Additionally, SallyCMSTweeter provides te public function tweetText() for arbitary use.