Please upgrade here. These earlier versions are no longer being updated and have security issues.

Twitter Login error

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:
tdh

Comments

  • UnderDogUnderDog Moderator

    Show what's on line 305 of that file. There's an exotic exception that needs to be resolved

    Shadowdaredavidarribas
  • On line 305:

    throw new OAuthException(GetValue('error', $Result, $Result), $HttpCode, $previous);

    and form part of this code:

    if ($HttpCode == '200')
    return $Result;
    else
    throw new OAuthException(GetValue('error', $Result, $Result), $HttpCode, $previous);
    }

    Thanks for the interest.

    UnderDog
  • Ran across it too. Twitter recently changed their API, could this be related to that?

  • UnderDogUnderDog Moderator

    Both of you have to debug the code a bit. Help each other

  • 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.

    UnderDogkepano
  • If you find the line that begins with: public static $BaseApiUrl = and change the URL from the v1 version of the API to https://api.twitter.com/1.1/ you should be back in business, at least temporarily. See https://dev.twitter.com/blog/api-v1-retirement-final-dates

    UnderDoghgtonightSahilkhanna
  • Thanks 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
  • tdh AWESOME!!! Worked first shot. The old plugin really needs to be upgraded.

  • Great Job! Thank You tdh

Sign In or Register to comment.