Welcome Guest, Not a member yet? Register   Sign In
Library for getting tweets
#3

[eluser]Unknown[/eluser]
Bart, try instantiating it before using it.
Instead of
Code:
function index()
    {    
        $this->load->library('Tbird');
        
        $this->tbird->config('user', 'myusername', '5', '300', '25');
        
        $data['tweets'] = $this->tbird->filter();
        
        $this->load->view('v_home', $data);
    }
Try using it like that:
Code:
function index()
    {    
        $this->load->library('Tbird');
        
        $instance = new Tbird();

        $instance->config('user', 'myusername', '5', '300', '25');
        
        $data['tweets'] = $instance->filter();
        
        $this->load->view('v_home', $data);
    }

The errors you are getting are because you did not instantiate a Tbird object, without an object you can't set config, and the class by itself will return nothing.

I hope that solves your problem.


Messages In This Thread
Library for getting tweets - by El Forum - 09-21-2010, 09:16 PM
Library for getting tweets - by El Forum - 10-26-2010, 01:20 PM
Library for getting tweets - by El Forum - 10-26-2010, 02:00 PM
Library for getting tweets - by El Forum - 10-28-2010, 05:08 AM
Library for getting tweets - by El Forum - 10-29-2010, 04:20 AM
Library for getting tweets - by El Forum - 04-25-2011, 02:07 PM
Library for getting tweets - by El Forum - 01-19-2013, 04:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB