This simple library gets status updates from Twitter to use in your CodeIgniter application.
Because Twitter creates RSS Feeds of updates, it’s really easy to get updates.
Here’s how to use it…
$this->load->library('twitter'); $config = array( 'userid' => 'youruserid', 'username' => 'yourusername', 'type' => 'mine', 'num' => 10, 'rss_cache_path' => APPPATH.'cache/twitter-rss-cache', 'cache_time' => 300 // 5 minutes ); // $config['type'] can be 'mine' (just your own tweets), // or 'social' (includes people you follow) $this->twitter->init($config); $data['tweets'] = $this->twitter->get_latest();
The userid can be found by visiting your status page (http://twitter.com/username) and finding the number in your RSS feed link at the bottom of the page.
Your cache path must be writable by your CI application.
REQUIRES: SimplePie CodeIgniter Library
Version: 1.0
Recent Comments