2017 © Pedro Peláez
 

silverstripe-module twitter-stripe

Oauth connector for Twitter

image

kmayo-ss/twitter-stripe

Oauth connector for Twitter

  • Friday, April 15, 2016
  • by kmayo-ss
  • Repository
  • 3 Watchers
  • 2 Stars
  • 1,213 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Twitter

Introduction

The Twitter module supports OAuth on the 1.1 version of Twitter. It uses the Twitter library codebird-php (https://github.com/jublonet/codebird-php), (*1)

Copyright (C) 2010-2014 kirk@silverstripe.com, (*2)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version., (*3)

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details., (*4)

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/., (*5)

Maintainer Contact

* Kirk Mayo kirk (at) silverstripe (dot) com

Requirements

* SilverStripe 3.0 +

Features

  • Connects to Twitter API 1.1 via OAuth
  • Fetches tweets for a user timeline

Composer Installation

composer require kmayo-ss/twitter-stripe, (*6)

Installation Manual

  1. Download the module form GitHub (Composer support to be added)
  2. Extract the file (if you are on windows try 7-zip for extracting tar.gz files
  3. Make sure the folder after being extracted is named 'twitter-stripe'
  4. Place this directory in your sites root directory. This is the one with framework and cms in it.
  5. Run in your browser - /dev/build to rebuild the database.

Usage

To use the module you will need add your OAuth details to the config, see below for example yml config, (*7)

---
Name: mysite
After:
  - 'framework/*'
  - 'cms/*'
---
# YAML configuration for SilverStripe
# See http://doc.silverstripe.org/framework/en/topics/configuration
# Caution: Indentation through two spaces, not tabs
SSTwitter:
  CONSUMER_KEY: Your Twitter Consumer Key from Twitter dashboard
  CONSUMER_SECRET: Your Twitter Consumer Secret from Twitter dashboard
  OAUTH_TOKEN: Your Twitter OAuth token from Twitter dashboard
  OAUTH_SECRET: Your Twitter OAuth secret from Twitter dashboard
  TWITTER_SCREENNAME: Your Twitter screenname/username

To fetch Tweets Twitter you need to call the constructor and the method getTweets as per the example below, (*8)

            // setup the instance
            $twitter = new SSTwitter();
            // call the following method to get the number of tweets
            // this example fetches the last tweet you may 
            $tweets = (array)$twitter->getTweets(1);
            $tweet = $tweets[0];

To send tweets the constructor needs to be called and the method sendTweet needs to be used as below, (*9)

        $twitter = new SSTwitter();
        $twitter->sendTweet('Your updated status');

TODO

Add more Twitter features, (*10)

The Versions

15/04 2016

dev-master

9999999-dev

Oauth connector for Twitter

  Sources   Download

BSD-3-Clause

by Kirk Mayo

oauth silverstripe twitter

11/01 2016

v1.1.3

1.1.3.0

Oauth connector for Twitter

  Sources   Download

BSD-3-Clause

by Kirk Mayo

oauth silverstripe twitter

30/11 2015

dev-search

dev-search

Oauth connector for Twitter

  Sources   Download

by Kirk Mayo

oauth silverstripe twitter

30/11 2015

v1.1.2

1.1.2.0

Oauth connector for Twitter

  Sources   Download

by Kirk Mayo

oauth silverstripe twitter

17/09 2015

v1.1.1

1.1.1.0

Oauth connector for Twitter

  Sources   Download

by Kirk Mayo

oauth silverstripe twitter

17/09 2015

dev-textagroup-patch-1

dev-textagroup-patch-1

Oauth connector for Twitter

  Sources   Download

by Kirk Mayo

oauth silverstripe twitter

19/02 2015

dev-test

dev-test

Oauth connector for Twitter

  Sources   Download

by Kirk Mayo

oauth silverstripe twitter

19/02 2015

v1.1

1.1.0.0

Oauth connector for Twitter

  Sources   Download

by Kirk Mayo

oauth silverstripe twitter

03/01 2015

1.0

1.0.0.0

Oauth connector for Twitter

  Sources   Download

by Kirk Mayo

oauth silverstripe twitter