I’m trying to use the Zend twitter service in codeigniter.
I have used the following method to integrate zend http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/
I can successfully complete the Oauth authentication and receive a valid access token from twitter, and my callback page works fine, but when I try to make a request I get the following error:
Message: Undefined offset: 0
Filename: Client/Result.php
Line Number: 232
I’m loading the twitter class like this:
$this->load->library('zend');
$this->zend->load('Zend/Service/Twitter');
I’m not sure if there’s anything else I should be loading, or what I’m doing wrong.
I’m using Codeigniter 2.0.2 and ZendFramework 1.11.4
Any help would be very much appreciated.
This error doesn’t seem to be related directly with CodeIgniter and Zend. Looking at the code on line 232 I can see this
This is within the following function
It appears that
$resultis not an array – and to be honest this doesn’t seem like a very well thought out function. Try looking into the class in questionZend/Rest/Client/Result.php, seeing what$resultis and if the call to Twitter is actually successful.Hope that helps.