Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.13 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.13 KB

SilverStripe Twitter Feed

Requirements

Silverstripe 3.0+

Maintainer

Tyler Kidd - [email protected] Pull requests welcome.

Installation

Download this module into a folder in the root of your project. Does not require /dev/build.

Usage

The simplest case is to add this to _config.php:

Object::add_extension('Page', 'TwitterFeedExtension');

Then setup your Twitter config:

TwitterFeedExtension::$twitter_cache_enabled = true; //optional

TwitterFeedExtension::$twitter_cache_key = ''; //optional - required if $twitter_cache_enabled is true
TwitterFeedExtension::$twitter_cache_id = ''; //optional - required if $twitter_cache_enabled is true

TwitterFeedExtension::$twitter_consumer_key = ''; //required
TwitterFeedExtension::$twitter_consumer_secret = ''; //required
TwitterFeedExtension::$twitter_oauth_token = ''; //required
TwitterFeedExtension::$twitter_oauth_token_secret = ''; //required

TwitterFeedExtension::$twitter_user = ''; //optional

To obtain Twitter consumer keys and oauth tokens visit https://dev.twitter.com/apps.

Then just add $TwitterFeed anywhere you want.