twitter-async icon indicating copy to clipboard operation
twitter-async copied to clipboard

Stopped working with deprecated URL

Open neauoire opened this issue 13 years ago • 16 comments

It seems twitter made a few changes to their API and the code stopped working. Does anyone know how to make it work with the new URLs ?

neauoire avatar Oct 11 '12 18:10 neauoire

The urls are defined here. https://github.com/jmathai/twitter-async/blob/master/EpiTwitter.php#L17

Are they incorrect?

jmathai avatar Oct 11 '12 18:10 jmathai

Well I've been using your script for a few apps and they all went down, I think even your twitter ticker on your home page went down.

I need to change something to make it work with the API 1.1 I think.

https://dev.twitter.com/discussions/10803

Any ideas ?

neauoire avatar Oct 11 '12 18:10 neauoire

I only had to change version number in EpiTwitter.php to 1.1 and search worked just fine in the new version


Norberto Zurita 609 78 70 73


-----Original Message----- From: Jaisen Mathai [email protected] Date: Thu, 11 Oct 2012 11:40:31 To: jmathai/[email protected] Reply-To: jmathai/twitter-async [email protected] Subject: Re: [twitter-async] Stopped working with deprecated URL (#153)

The urls are defined here. https://github.com/jmathai/twitter-async/blob/master/EpiTwitter.php#L17

Are they incorrect?


Reply to this email directly or view it on GitHub: https://github.com/jmathai/twitter-async/issues/153#issuecomment-9352750

nzurita avatar Oct 11 '12 18:10 nzurita

@nzurita Pull request :)

jmathai avatar Oct 11 '12 18:10 jmathai

Im just new to github, sorry! And more than changing version number maybe it should be a public property, so you can use both versions as needed, my solution was just a patch (actually I joined github after finding your library :-))

Regards


Norberto Zurita 609 78 70 73


-----Original Message----- From: Jaisen Mathai [email protected] Date: Thu, 11 Oct 2012 11:59:23 To: jmathai/[email protected] Reply-To: jmathai/twitter-async [email protected] Cc: Norberto [email protected] Subject: Re: [twitter-async] Stopped working with deprecated URL (#153)

@nzurita Pull request :)


Reply to this email directly or view it on GitHub: https://github.com/jmathai/twitter-async/issues/153#issuecomment-9353421

nzurita avatar Oct 11 '12 19:10 nzurita

@nzurita that reminds me. There's a useApiVersion method.

So $twitter->useApiVersion('1.1') should fix it for you without modifying the source. Though the default should be updated to reflect a working version.

https://github.com/jmathai/twitter-async/blob/master/EpiTwitter.php#L60

jmathai avatar Oct 11 '12 19:10 jmathai

Turns out I was running an old version of this script. Updating, and running simpleTest.php gives me an error once I entered the keys and tokens.

$twitterObjUnAuth->getAuthenticateUrl()

Fatal error: Uncaught exception 'EpiOAuthException' in /nfs/URL/html/inc/twitter/v2/EpiOAuth.php:434 Stack trace: #0 /nfs/URL/html/inc/twitter/v2/EpiOAuth.php(404): EpiOAuthException::raise(Object(EpiCurlManager), false) #1 /nfs/URL/html/inc/twitter/v2/EpiOAuth.php(45): EpiOAuthResponse->get('oauth_token') #2 /nfs/__URL/html/inc/twitter/v2/simpleTest.php(23): EpiOAuth->getAuthenticateUrl() #3 {main} thrown in /nfs/URL/html/inc/twitter/v2/EpiOAuth.php on line 434

neauoire avatar Oct 11 '12 19:10 neauoire

The example on your site seems to be down.

http://www.jaisenmathai.com/sign_in_with_twitter/start.php

neauoire avatar Oct 11 '12 19:10 neauoire

Not sure what the issues are at the moment but there are some unit tests failing. Tracking that in issue #154. Most seem to pass though (even with an api version of 1).

I probably won't get to these issues immediately though. If you're able to track anything down on your own then it would definitely help.

jmathai avatar Oct 11 '12 19:10 jmathai

I will keep on trying things and keep you posted.

neauoire avatar Oct 11 '12 19:10 neauoire

Just wanted to post my findings. I do think that authenticating a new user to use the application no longer works.

However, posting new status updates still works.

I previously had the error of unknown URL. Then after updating the API URL, I had the error about failing to authenticate. Both of these errors were caused because I was using the outdated script.

Make sure you upgrade to the latest version of all required files and follow the advice of @jmathai and @nzurita to update to public $version = '1.1'; in EpiOAuth.php

xpose2000 avatar Oct 13 '12 20:10 xpose2000

I also am no longer able to sign up new users, even with the "1.1" changes. Is anyone here able to sign up new users?

Thanks!

phil18 avatar Oct 17 '12 19:10 phil18

Support on this product is terrible Better to switch to https://github.com/abraham/twitteroauth Works perfectly with 1.1

bhogoose avatar Oct 27 '12 19:10 bhogoose

@bhogoose I've always suggested @abraham's library to anyone who had trouble with mine. But don't complain about free open source software you didn't contribute to or pay for.

To everyone else on this thread. I (unfortunately) don't really have much time to update the library and confirm that it works. Try @abraham's library and possibly write a wrapper that would let you keep your current code working without having to make modifications (since the interfaces differ).

Pull requests are always welcome :).

jmathai avatar Oct 27 '12 22:10 jmathai

I'll keep waiting for some updates because I really like to use this library, all my applications use it :)

woppywush avatar Jan 04 '13 08:01 woppywush

@woppywush you are better off switching to a different library as @bhogoose mentioned.

I am now using https://github.com/themattharris/tmhOAuth.

xpose2000 avatar Jan 04 '13 16:01 xpose2000