2017 © Pedro Peláez
 

silverstripe-module twitter-feed

Inserts a custom styled Twitter feed on any SilverStripe page, uses Twitter API v1.1

image

purplespider/twitter-feed

Inserts a custom styled Twitter feed on any SilverStripe page, uses Twitter API v1.1

  • Thursday, February 18, 2016
  • by purplespider
  • Repository
  • 3 Watchers
  • 2 Stars
  • 95 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Twitter Feed Module

Introduction

Allows you to add a custom styled Twitter feed to any page on your SilverStripe website., (*1)

The module uses the new Twitter v1.1 API to grab a specified number of tweets from a specified user, allowing you to output them to custom HTML in a template., (*2)

Maintainer Contact

  • James Cocker (ssmodulesgithub@pswd.biz)

Requirements

  • Silverstripe 3.1+

Installation Instructions

  1. Add the twitter-feed directory to the root of your SS install.
  2. Go to https://dev.twitter.com/apps and Create a new application. Then click Create my access token, you'll then have a key, a token, and a secret for each.
  3. Add the following lines to your _config.php:, (*3)

    // Allows you to have a Twitter feed on any page.
    Object::add_extension('Page', 'TwitterFeed'); 
    
    // Fill in the following from your Twitter Application:
    TwitterFeed::set_consumer_key('XXXXX');
    TwitterFeed::set_consumer_secret('XXXXX');
    TwitterFeed::set_user_token('XXXXX');
    TwitterFeed::set_user_secret('XXXXX');
    
    TwitterFeed::set_username('twitter'); // The Twitter username to get the feed from
    TwitterFeed::set_tweetcount('4'); // The max number of tweets to display
  4. Use the included TwitterFeed.ss as an example for creating your HTML for the template. Important: This basic example is designed to be used as a starting point, and does not meet Twitter's new strict Developer Display Requirements: https://dev.twitter.com/terms/display-requirements Please make sure the way you display the Twitter feed meets these requirments or your Twitter app may be banned., (*4)

Acknowledgments

Thanks to Matt Bailey's SilverStripe Widget: https://github.com/matt-bailey/, (*5)

And Matt Harris's Twitter OAuth Library: https://github.com/themattharris/tmhOAuth, (*6)

The Versions

18/02 2016

dev-master

9999999-dev https://github.com/purplespider/silverstripe-twitter-feed

Inserts a custom styled Twitter feed on any SilverStripe page, uses Twitter API v1.1

  Sources   Download

BSD-3-Clause

The Requires

 

by James Cocker

feed silverstripe twitter