Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Twitter Login error
davidarribas
New
Hello,
I have this error when login with twitter in our forum:
Fatal error: Wrong parameters for Exception([string $exception [, long $code ]]) in /(...)/foro/plugins/Twitter/class.twitter.plugin.php on line 305
The users of our forum can't login with twitter because the above error.
Have anyone any idea about how to solve the problem?
thanks in advance.
Tagged:
1
Comments
Show what's on line 305 of that file. There's an exotic exception that needs to be resolved
There was an error rendering this rich post.
On line 305:
and form part of this code:
}
Thanks for the interest.
Ran across it too. Twitter recently changed their API, could this be related to that?
Both of you have to debug the code a bit. Help each other
There was an error rendering this rich post.
Would that I could, but I don't dare fiddle with live files on my almost non-existant mobile connection. I got the exact same error with a user who is verified to have logged in previously. Just wanted to verify it to be an issue for others too, and offer an input on the go, as I've seen other Twitter API related things break the past few days.
I'll try to debug when I can, but I doubt it'll be today.
If you find the line that begins with:
public static $BaseApiUrl =
and change the URL from the v1 version of the API tohttps://api.twitter.com/1.1/
you should be back in business, at least temporarily. See https://dev.twitter.com/blog/api-v1-retirement-final-datesFinally had some stable connectivity to look at this.
Thanks @mrpta, that's exactly right. And as expected, this was a Twitter API issue which needs to be addressed in the plugin properly.
I have updated to the 1.1 API in
class.twitter.plugin.php
Here's a ZIP with the whole plugin: http://tdh.me/_tmp/Vanilla-Twitter-plugin-forked.zip (just extract and replace the current Twitter plugin in
/plugins
)Or just swap out the old
class.twitter.plugin.php
in/plugins/Twitter
with the one from the ZIP above, or directly from this Gist: https://gist.github.com/tdhftw/5804003Thanks for find the solution, my technical knowledge in PHP are limited. practically defined in copy, paste and little else.
Thank you very much again, I owe you a beer
tdh AWESOME!!! Worked first shot. The old plugin really needs to be upgraded.
Great Job! Thank You tdh