Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update application/libraries/tweet.php #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marsanla
Copy link

Some modifications for new api

Some modifications for new api
@messified
Copy link

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

@zidell
Copy link

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}";
}
*/

@jazibsheikh
Copy link

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}

@marsanla
Copy link
Author

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.

@marsanla
Copy link
Author

@perrohunter
Copy link

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?

@marsanla
Copy link
Author

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
Copy link

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants