php - How can I use the Zend library, specifically the twitter class with codeigniter? -
i'm trying use zend twitter service in codeigniter.
i have used following method integrate zend http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/
i can complete oauth authentication , receive valid access token twitter, , callback page works fine, when try make request following error:
message: undefined offset: 0 filename: client/result.php line number: 232 i'm loading twitter class this:
$this->load->library('zend'); $this->zend->load('zend/service/twitter'); i'm not sure if there's else should loading, or i'm doing wrong.
i'm using codeigniter 2.0.2 , zendframework 1.11.4
any appreciated.
this error doesn't seem related directly codeigniter , zend. looking @ code on line 232 can see this
return (string) $result[0]; this within following function
/** * tostring overload * * sure call when result single value! * * @return string */ public function __tostring() { if (!$this->getstatus()) { $message = $this->_sxml->xpath('//message'); return (string) $message[0]; } else { $result = $this->_sxml->xpath('//response'); if (sizeof($result) > 1) { return (string) "an error occured."; } else { return (string) $result[0]; } } } it appears $result not array - , honest doesn't seem thought out function. try looking class in question zend/rest/client/result.php, seeing $result , if call twitter successful.
hope helps.
Comments
Post a Comment