Abraham's Twitter oAuth for 1.1 API?

@jerrylthompson Jerry Thompson

Does anyone know if the Twitter oAuth PHP library https://github.com/abraham/twitteroauth will be updated to support Twitter's 1.1 API? I reached out to him but perhaps someone will fork it and update it as it doesn't appear to have been touched in quite some time.

If not, perhaps some of us who utilize it may want to band together to fork it? Though if Abraham is working on it, that would be awesome.

1 year 21 weeks ago


@Spiele_R Browsergame Spieler

you can change in file: twitteroauth.php

public $host = "https://api.twitter.com/1/";
public $host = "https://api.twitter.com/1.1/";

but ... if i use the /1.1/ URL
i get in HEADER: [x_warning] => Invalid OAuth credentials detected
but results 're there ?

1 year 21 weeks ago
@episod Taylor Singletary

Are you using an access token with your requests? Make sure you're using an access token and that your system clock is sync with ours.

1 year 21 weeks ago
@abraham Abraham Williams

The best way to update to the v1.1 is the following:

  1. $connection = new TwitterOAuth(...);
  2. $connection->host = "https://api.twitter.com/1.1/";

That way you don't have to edit twitteroauth.php.

1 year 21 weeks ago
@RobinLinderborg Robin Linderborg

So what exactly are you supposed to replace the dots with on line 1?

1 year 15 weeks ago
@RobinLinderborg Robin Linderborg

Oh, the keys right?

1 year 15 weeks ago
@MugenBatteries Mugen Power

Thank you very much, Abraham! Finally solved it with this line!

1 year 6 weeks ago
@TweetaBeater Tweeta Beater

@abraham I'm using twitteroauth to make a simple twitter account manager - thank you for releasing such an awesome library!

Every thing works beautifully with v1 api but I tried updating to 1.1 api and it's now causing some errors - trying to perform a users/show works once but the second time the api is refusing the connection.

I ran the test.php that came with your twitteroauth github using v1.1 and it also doesn't complete all the tasks now.

When I switch back to v1 everything works fine again.

Do you know what might be causing this?

Thanks again for twitteroauth.

1 year 2 weeks ago
@timoScript timo thy

thanks my problem is Now solved.

43 weeks 5 days ago
@umair_hamid umair Hamid

Whereto write this code?

42 weeks 1 day ago
@umair_hamid umair Hamid

i change all number fromn 1.0 to 1.1 in twitteroath and oath file. then on calling back from twitter refresh the page. It hides the error :)

42 weeks 1 day ago
@mss_randhir Randhir

Hello abraham i want know how can i get permanent access token ?

13 weeks 5 days ago
@WesymUser WESYM

I am using tweet library in codeigniter for implementing login with twitter,It has been working fine in last 1 year but now it is not working fine,How can I update API 1.0 to 1.1 for implementing login with twitter functionality or please give the link for another library for implementing the same

1 year 5 days ago
@teshvenk Venkatesh Ramdass

@WesymUser : I too have same problem. How to upgrade API 1.0 to 1.1. I am using twitter library for codeigniter.. Got any updated library ?

1 year 3 days ago
@lldev2 LuxuryLink Developer

Checkout Abrahams comments above.

  1.     $connection = new TwitterOAuth(...);
  2.     $connection->host = "https://api.twitter.com/1.1/";

Then look at the examples in index.php on Git. He has put it all there for you.

Dicely, done, Abraham!

51 weeks 4 hours ago
@elumpravin Pravin Sawant

Thank you!
It helps me a lot to resolve my issue :)

43 weeks 1 day ago
@vickythegme vickythegme

It doesn't seem to work for me. I have tried changing the $host variable on twitteroauth.php too.

43 weeks 22 hours ago
@OeseJoseph joseph oese


42 weeks 1 day ago
@prabha_riddles Prabhavathi

There are some other better twitter api library in github

42 weeks 1 day ago
@_silver_crow_ -☪Sniper™☪-


41 weeks 6 days ago
@brianjaputra Brian Japutra

@abraham your code is not working anymore for OAuth. It always throw an Exception "Failed to validate oauth signature and token". Maybe you must test it yourself.

39 weeks 1 day ago
@mods4dolphin mods4dolphin

Hi Brian,
We were getting the same error and we cleared the browser cache and it worked. Also try resetting the keys in the twitter app...


38 weeks 2 days ago
@krishnatiw krishna

can I fetch all tweets from fome page in php

36 weeks 5 days ago
@muzafarali Muzafar Ali


i'm getting $connection->http_code is 200 but when i used
/* Get logged in user to help with tests. */
$user = $connection->get('account/verify_credentials');

and it's return me
.stdClass Object ( [errors] => Array ( [0] => stdClass Object ( [message] => Bad Authentication data [code] => 215 ) ) )

i checkout everything like key and secrete key etc everything is fine ..

also download new library but getting same error??

can anyone help??


30 weeks 1 day ago
@jaidevsoftlogiq jaidave


I am geeting an error with Twitter connect failed on the following link

but its working fine on the other server
I am using same code on both server and both are in codeigniter

Thanks in advance

27 weeks 5 days ago
@hani_rafique Hani rafique

i am new for developing application which contains public tweets so no need of authentication and i have also registered my app so my question is how i download the twitter api or i use any builtin library.

25 weeks 3 days ago
@avinashadluri Avinash Raju Adluri

Awesome.it works for me.. But I just wanted to know how to check if a user has already authorized application or not.. abraham sir, please provide some doc for this.. :) thanks.

20 weeks 6 days ago
@hamada_gabr hamada gabr

Please my friends , I'm using this api and i want to know how to make user of my site logout ,
If i loged out from twitter directly ,my web site wouldn't loged out, i want the code to log user out

14 weeks 3 days ago