No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
mishudark Merge pull request #21 from youkidearitai/master
Fixed multibyte (utf-8) string tweet
Latest commit 2e8112b Oct 15, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Config
Controller
Lib/Utility Fixed multibyte (utf-8) string tweet Sep 19, 2015
Model/Behavior
Vendor
View/Twitter Added Config File, and Controller Views and Methods. Mar 23, 2012
.gitignore ignored the config file, and left the twitter.default.php file Mar 23, 2012
README.md Update README.md Sep 3, 2012

README.md

CakePHP-2.x-Twitter-Plugin

This is a plugin for CakePHP to connect your app with the Twitter API using OAuth. With this plugin it's possible to access the main API methods (such as status updates, timelines or user) of the Twitter API in all of your controllers. You even have the opportunity to make custom API-Calls with this plugin.

It has a component and a behavior which are largely similar. (If anyone knows a way to combine the code from both into one reusable area please do tell)

Usage

  • Upload to app/Plugin/Twitter

  • Rename Config/twitter.default.php to Config/twitter.php

  • Update the config file with your twitter app keys

  • Go to YOURSITE/twitter/twitter/connect

  • (as one example) Put some code that will send an update to Twitter in a model (maybe something like...)

      public function afterSave($created) {
      	$oauth_token = [either a session or from where the token is saved in db];
      	$oauth_token_secret = [either a session or from where the token is saved in db];
      	$this->Behaviors->load('Twitter.Twitter', array(
      		'oauthToken' => $oauth_token, 
      		'oauthTokenSecret' => $oauth_token_secret,
      		));
      	$this->updateStatus('Some message you want to tweet');
      }
    

The plugin uses 'http_socket_oauth' (https://github.com/neilcrookes/http_socket_oauth) by Neil Crookes <www.neilcrookes.com> as extension for the CakePHP 'HttpSocket'.

NOTE: This plugin does not support the "Twitter for Websites" Features (https://dev.twitter.com/docs/twitter-for-websites) like follow buttons or direct authentication.

Requirements:

Additional Links From Original Fork:

https://github.com/fnitschmann/CakePHP-Twitter-Plugin/wiki/Installation

https://github.com/fnitschmann/CakePHP-Twitter-Plugin/wiki/Function-Reference

https://wiki.github.com/fnitschmann/CakePHP-Twitter-Plugin

@license MIT License (http://www.opensource.org/licenses/mit-license.php)