Update application/libraries/tweet.php #25

wants to merge 2 commits into


None yet
8 participants

Some modifications for new api

Update application/libraries/tweet.php
Some modifications for new api

After applying the changing to the library the $options = array('count' => 10); doesn't seem to working. Thoughts?


ghost commented on 0e7e02d Oct 12, 2012

Hi, thanks for the update!!

have this error when update the status

Message: Undefined property: stdClass::$request

Filename: libraries/tweet.php

Line Number: 225

exception 'tweetException' with message '401 | Request Failed: -


Replace de Post function with the old library.

Getting the same error as vixnet. Is there an update for this?

zidell commented Oct 13, 2012

Thank you for your update! : )
But I've got this error messages.
{"errors":[{"message":"Could not authenticate you","code":32}]}

In my case, I updated some lines like this,

Line Number : 107 -> prepend question mark and assign the 'request' key
$url .= '?'.http_build_query($params['request']);

Line Number : 134 -> assign the 'request' key
$post = http_build_query($params['request']);

Line Number : 664 ~ 667 -> wrap entire if-condition with comment syntax
if ( $port > 0 && ( $scheme === 'http' && $port !== 80 ) || ( $scheme === 'https' && $port !== 443 ) )
$retval .= ":{$port}";

I am using this library and getting this error & Exception can anybody look into this ?

Severity: Notice

Message: Undefined property: stdClass::$request

Filename: libraries/tweet.php

Line Number: 207

exception 'tweetException' with message '401 | Request Failed: - ' in D:\xampp\htdocs\jazibpro\application\libraries\tweet.php:207
Stack trace:
#0 D:\xampp\htdocs\jazibpro\application\libraries\tweet.php(174): tweetConnection->_getResponse('Resource id #44')
#1 D:\xampp\htdocs\jazibpro\application\libraries\tweet.php(131): tweetConnection->_addCurl('http://api.twit...', Array)
#2 D:\xampp\htdocs\jazibpro\application\libraries\tweet.php(509): tweetConnection->post('http://api.twit...', Array)
#3 D:\xampp\htdocs\jazibpro\application\libraries\tweet.php(338): tweetOauth->_httpRequest('POST', 'http://api.twit...', Array)
#4 [internal function]: tweetOauth->call('post', 'statuses/update', Array)
#5 D:\xampp\htdocs\jazibpro\application\libraries\tweet.php(19): call_user_func_array(Array, Array)
#6 [internal function]: tweet->__call('call', Array)
#7 D:\xampp\htdocs\jazibpro\application\controllers\ajax\test.php(602): tweet->call('post', 'statuses/update', Array)
#8 [internal function]: Test->posttweet()
#9 D:\xampp\htdocs\jazibpro\system\core\CodeIgniter.php(325): call_user_func_array(Array, Array)
#10 D:\xampp\htdocs\jazibpro\index.php(201): require_once('D:\xampp\htdocs...')
#11 {main}

I update the library, and now i can send statuses and do everything. Also i add the possibility to get header from the call, just adding after tweet call: $this -> tweet -> get_header().

Try and if you have any issue just tell me.

Right now i am trying to develop function to upload media.

Hey Marsanla, I can't get the library to work out of the box, should I modify anything else? how do I dump the twitter response?

Hi @perrohunter, Sorry for my late answer. Actually what's is the exact problem? For me, the library is working, i already used in several projects.

You have to get the customer token and customer secret token, and change that into config.php file.

Tell me more about your problem.

milioh commented Jan 28, 2013

Do you have a example using "statuses/update_with_media" using your API?

I can`t use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment