EllisLab text mark
Advanced Search
     
Twitter Search
Posted: 14 March 2010 09:26 PM
Avatar
Joined: 2009-10-06
25 posts

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 .(JavaScript must be enabled to view this email address) 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:

$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 :D

Get the lib at
Lusahn Lib Sources

 Signature 

Start with the Basics and make sure their solid

————————————————————————-

 
Posted: 18 November 2010 07:32 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2010-02-08
21 posts

Dont you forget:

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

in your class?

 
Posted: 18 November 2010 07:38 AM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2009-10-06
25 posts

Thanks updated and inserted tag into first line.

 Signature 

Start with the Basics and make sure their solid

————————————————————————-