Welcome Guest, Not a member yet? Register   Sign In
Haughin's Twitter Library - Problem Updating Status

I am having problems with updating my twitter status in my CI app. I am using Elliot Haughin's Twitter Library and am using the oAuth method for authentication. I have registered an app over at Twitter and can view my friend's updates, but every time I call $this->twitter->call('statuses/update', array('status' => 'Tweet')); it loads the rest of the code (which is just an echo to make sure the page loaded), but I go over to Twitter there is no new tweet.

Can anyone help? Is there anyway to see what Twitter is returning?


I'm trying to make the library work, but I'm having some problems too. I followed the steps:

1 - Changed '$config['uri_protocol'] = "AUTO";' to '$config['uri_protocol'] = "PATH_INFO";' in config.php;

2 - Changed '$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';' to '$config['permitted_uri_chars'] = 'a-z? 0-9~%.:_-';'

3 - Copy MY_Input.php and Twitter.php to application/libraries;

4 - When I registered the application I gave the path to the controller: CALLBACK URL --> http://domain.co.uk/project/home

The probem is, when I run my program I'm redirected to twitter to give authorization, but when I press the 'allow' button, I'm not redirect back to my application. Every time I press the 'allow' button, the twitter page for authorization just reloads, because I can see the oauth_token changing every time:


The only 'strange' thing I did was to add the url to my hosts, cause I'm developing localhost and I cant put urls like http://localhost/.. in callback when I registered the application. Can this be the problem? I added: domain.co.uk/project/home/callback

Anyone with this problem?

Hey again..

I found this error in Firebug:

Failed to load source for: http://domain.co.uk/project/home?oauth_t...84QIiyL6Hw

The callback in twitter is defined like: http://tdomain.co.uk/project/home

This is something to do with '$config['uri_protocol']= "PATH_INFO";' defined in the config file? I'm new to codeigniter, so sorry for this stupid questions.

Any clues of what thins means?

Ok, I found the solution!

The problem was in the .htaccess file I'm using (to remove the index.php from the url)

I changed RewriteRule ^(.*)$ /index.php?/$1 [L] to RewriteRule ^(.*)$ /index.php/$1 [L] and now is working. I found that in a comment in this link: http://www.askaboutphp.com/58/codeignite...rings.html

If someone needs more information, just let me know.


i facing problem with this also im just redirected to this url without any token how can i solve this problem.


Are you using the Elliot Haughin library? I used that with the controller that is included in the library. I just inserted my $consumer_key and $consumer_key_secret...

You did any changes?

no i did not change anything i using it on localhost for testing i also use the same thing as it is but redirected to this page.

You did the changes in the config file?
you configured your hosts?
What is you URL Callback?

well this something interesting where i can find it in config file well this library don't have config do i have to change it in CI config. help me please.

The steps are here:

Just follow the steps.

Theme © iAndrew 2016 - Forum software by © MyBB