Twitter

This plugin has no dependancies.

This simply utilises a fantastic plugin by Abraham Williams which you can find here. Thank you! It simply adds a file which includes this plugin and where you can configure your Twitter credentials. It is to use Twitter's OAuth REST API and provides an example in the file shown below.

/config/twitter.php

 
$php_plugins = array(
	"all"=>array("twitter")
);
	 

/php/plugins/twitter/twitter.php

 
require_once(dirname(__FILE__).'/core/twitteroauth.php');
define('CONSUMER_KEY', 'YOURKEY');
define('CONSUMER_SECRET', 'YOURSECRET');



/* Create a TwitterOauth object with consumer/user tokens. */
/*EXAMPLE USAGE*/
/*
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, '', '');
$tweets = $connection->get('statuses/user_timeline', array('screen_name' => '','count'=>1));
$tweet = $tweets[0]->text;
$formatted_text = preg_replace('/(\b(www\.|http\:\/\/)\S+\b)/', "$1", $tweet);
$formatted_text = preg_replace('/\#(\w+)/', "#$1", $formatted_text);
$formatted_text = preg_replace('/\@(\w+)/', "@$1", $formatted_text);
*/