dev-master
9999999-dev http://silverstripe.orgThe SilverStripe CMS Twitter Module
BSD-3-Clause
The Requires
silverstripe twitter
The SilverStripe CMS Twitter Module
Still under active development., (*1)
This module lets you post messages to Twitter from the CMS., (*2)
You need to apply TwitterDecorator to the DataObject you want to use to generate and post statues to Twitter.You can apply this decorator to SiteTrees or DataObjects., (*3)
The decorator adds a checkbox used to confirm you want to post to Twitter (this preference is not stored in the DB), and a text field to store the last time you posted to Twitter., (*4)
There are a few ways to use the decorator. Add this in your mysite/_config.php, (*5)
DataObject::add_extension('MyDO','TwitterExtension'); TwitterExtension::set_twitter_fields(array('MyDO' => 'Title'));, (*6)
DataObject::add_extension('Page','TwitterExtension'); TwitterExtension::set_twitter_fields(array('Page' => array('Title','OtherField')));, (*7)
DataObject::add_extension('MyClass','TwitterExtension'); TwitterExtension::set_twitter_fields(array('MyClass' => array('MyFunction')));, (*8)
Simply add the module to the top level of your SilverStripe installation and perform a dev/build., (*9)
You need a Twitter account to post to, login to Twitter and get (http://dev.twitter.com/pages/auth):, (*10)
* Register an App * Consumer Key * Consumer Secret Key * Access Token * Access Secret Token (access token needs read/write permission), (*11)
PostToTwitter::set_twitter_consumer_secret('1234'); PostToTwitter::set_twitter_access_token('1234'); PostToTwitter::set_twitter_consumer_key('1234'); PostToTwitter::set_twitter_access_token_secret('1234');, (*12)
The SilverStripe CMS Twitter Module
BSD-3-Clause
silverstripe twitter