Twitter API に接続するために、Phil Sturgeon による Rest ライブラリをセットアップしました。ただし、うまく機能します (以下を参照)。
    $this->load->spark('restclient/2.1.0');
    $this->load->library('rest');
    $this->rest->initialize(array('server' => 'http://twitter.com/'));
    $username = 'my-username';
    // Pull in an array of tweets
    $tweets = $this->rest->get('statuses/user_timeline/'.$username.'.xml');
このコードはうまく機能しますが、Twitter API のドキュメントでは、少し異なるアプローチを使用することを推奨しています (以下を参照)。このライブラリで以下の新しいアプローチを使用するにはどうすればよいでしょうか?
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=twitterapi&count=2