Welcome Guest, Not a member yet? Register   Sign In
Twitter Search
#1

[eluser]Exxon[/eluser]
Hi I'm building a search feature for my website and thought it would be cool if I could let my users search my Twitter Status too. So I found this nifty library by [email=http://twitter.slawcup.com/twitter.class.phps]Ryan Faerman[/email] and converted (If you can call it that) to a Codeigniter library so I hope it helps someone. Just remember the lib makes use curl so make sure you have it installed.

How to use it:
Code:
$this->load->library('twitter');

//Get the top 10 trends from Twitter as a array
$trends = ($this->twitter->trends());

$params = array('search' => urldecode($search));
$this->load->library('twitter', $params);
$this->twitter->about("lusahn"); //Get tweets from the user lusahn

$results = $this->twitter->results();

The lib still has more functions like to (tweets to a user), since and contain. Just check the code each function has comments. If you find something that does not work please help me fix it ... This will help my site when it go live too so everybody wins Big Grin

Get the lib at
Lusahn Lib Sources
#2

[eluser]Bartolo![/eluser]
Dont you forget:

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>

in your class?
#3

[eluser]Exxon[/eluser]
Thanks updated and inserted tag into first line.




Theme © iAndrew 2016 - Forum software by © MyBB