It seems that there is a change on the twitter api according to this issue:
https://dev.twitter.com/discussions/16443

that seems that broke the signin process of the module.

Comments

svabael’s picture

I did't have enough time for debugging, so probably the patch is not a very good solution. In the twitter.lib.php file in the public function get_access_token(), we have to modify the following lines.

It is like that:

   try {
      $response = $this->auth_request($url);
    }
    catch (TwitterException $e) {
      watchdog('twitter', '!message', array('!message' => $e->__toString()), WATCHDOG_ERROR);
      return FALSE;
    }

and patched like that:

    try {
      // START PATCHING
      $param = array();
      $param['oauth_verifier'] = $_GET['oauth_verifier'];
      $response = $this->auth_request($url, $param);
      // END PATCHING
    }
    catch (TwitterException $e) {
      watchdog('twitter', '!message', array('!message' => $e->__toString()), WATCHDOG_ERROR);
      return FALSE;
    }
defagordi’s picture

Hi,
This patch work perfectly, thank you very much.

khu’s picture

Was struggling with this issue last night as well and took a more verbose approach.

opegasus’s picture

Perfect!

Thank you svabael !

Thanks, just hand coded it (since I do not know how to automagically apply patches, GIT-Drush or how to fly NASA shuttles) and it was spot on!

Twitter module now connects and added Twitter account. You saved me (and possibly tens of thousands) a lot of head scratching and time!

iwhitcomb’s picture

Works, ty!

sheldon rampton’s picture

Status: Active » Closed (duplicate)

This issue is a duplicate of http://drupal.org/node/1924478 which already has a patch that has been reviewed and tested by the community. I see that kchh90 has supplied a patch here which is different from the patch in the other issue thread. If kchh90's patch is better, I suggest posting it to the other issue thread.

pbonnefoi’s picture

Applying the patch solved the problem for me ! I haven't tried the one from http://drupal.org/node/1924478 thought.

tusik’s picture

#1 does the trick.

sheldon rampton’s picture

@cara1940: Even though it works, the patch from http://drupal.org/node/1924478 has now been committed and released. Rather than using the patch described in this issue ticket, therefore, you should just use the 7.x-5.x-dev or the official 6.x-5.1 release of this module.

iyan’s picture

Saves me! Thank you svabael!

akyrylenko’s picture

#1 this works for me fine.
svabael, Thanks a lot !

svabael’s picture

It is better to go with the official release that @Sheldon Rampton mentioned at #9. That fix on this thread is just very quick bugfix just after the change of the twitter api. It is better going with the official releases and patches :) . I don't know if i have the option to close somehow this thread.

tusik’s picture

excellent, thank you! updating now.