Abraham's Twitter oAuth for 1.1 API?

jerrylthompson
@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 22 weeks ago

Replies

Spiele_R
@Spiele_R Browsergame Spieler

you can change in file: twitteroauth.php

public $host = "https://api.twitter.com/1/";
to:
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 22 weeks ago
episod
@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 22 weeks ago
abraham
@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 22 weeks ago
RobinLinderborg
@RobinLinderborg Robin Linderborg

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

1 year 16 weeks ago
RobinLinderborg
@RobinLinderborg Robin Linderborg

Oh, the keys right?

1 year 16 weeks ago
MugenBatteries
@MugenBatteries Mugen Power

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

1 year 7 weeks ago
TweetaBeater
@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 3 weeks ago
timoScript
@timoScript timo thy

thanks my problem is Now solved.

44 weeks 6 days ago
umair_hamid
@umair_hamid umair Hamid

Whereto write this code?

43 weeks 2 days ago
umair_hamid
@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 :)

43 weeks 2 days ago
mss_randhir
@mss_randhir Randhir

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

15 weeks 54 min ago
WesymUser
@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 1 week ago
teshvenk
@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 1 week ago
lldev2
@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!

1 year 7 hours ago
elumpravin
@elumpravin Pravin Sawant

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

44 weeks 3 days ago
vickythegme
@vickythegme vickythegme

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

44 weeks 2 days ago
OeseJoseph
@OeseJoseph joseph oese

hello

43 weeks 2 days ago
prabha_riddles
@prabha_riddles Prabhavathi

There are some other better twitter api library in github

43 weeks 2 days ago
_silver_crow_
@_silver_crow_ -☪Sniper™☪-

Hello

43 weeks 1 day ago
brianjaputra
@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.

40 weeks 2 days ago
mods4dolphin
@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...

Regards,
M4D

39 weeks 4 days ago
krishnatiw
@krishnatiw krishna

can I fetch all tweets from fome page in php

37 weeks 6 days ago
muzafarali
@muzafarali Muzafar Ali

hi,

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');
print_r($user);

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??

Thanks

31 weeks 2 days ago
jaidevsoftlogiq
@jaidevsoftlogiq jaidave

Hi

I am geeting an error with Twitter connect failed on the following link
http://www.gmchld.com/homestay/twtest

but its working fine on the other server
http://rudrapuronline.net/DSR/twtest
I am using same code on both server and both are in codeigniter

Thanks in advance

28 weeks 6 days ago
hani_rafique
@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.

26 weeks 4 days ago
avinashadluri
@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.

22 weeks 22 hours ago
hamada_gabr
@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

15 weeks 4 days ago