Support » Plugin: Twitter Widget Pro » Authorize New Account does not redirect

  • Resolved atorreno

    (@atorreno)


    I’ve read every other support thread that describes a similar problem, but none of them resolves my issue.

    I have:
    – logged into dev.twitter.com
    – created a new application
    – filled in name, description, website, and callback url
    – agreed to rules, filled in captcha
    – copied consumer key and consumer secret to plugin settings page
    – clicked update options
    – clicked ‘authorize new account’

    Instead of being redirected to Twitter, the page refreshes, and I’m still in WordPress admin, on the Twitter Widget Pro settings page.

    I have tried the following, based on other threads:
    – Disabled other plugins
    – Ensured that I have entered my WP site domain in the twitter app callback url field
    – Adding random site domains to the callback url field

    My setup
    – WordPress 3.5.1
    – IIS 7
    – PHP 5.4.0

    A few extra notes
    – on dev.twitter.com, my access token wasn’t created, but there was a button allowing me to create one, so I did that.
    – my blog domain starts with ‘blog’, so my callback url is http://blog.[my blog name].com
    – I can use the advanced rest client in Chrome to make API calls, and get successful responses

    What else could I be missing?

    http://wordpress.org/extend/plugins/twitter-widget-pro/

Viewing 15 replies - 1 through 15 (of 25 total)
  • Plugin Author Aaron D. Campbell

    (@aaroncampbell)

    This was with v2.5.2 that was released earlier today? I actually don’t have any IIS servers to test it with, but I HAVE tested it on WordPress 3.5.1 and PHP 5.4

    atorreno

    (@atorreno)

    Sorry, I forgot to mention that, v2.5.2

    Plugin Author Aaron D. Campbell

    (@aaroncampbell)

    Unfortunately, I can’t reproduce this one. I’ll see if I can spin up a Windows machine to test, but that will probably take more time than I’ll have for the next several days at least.

    franciscanheart

    (@franciscanheart)

    I’m having the same issue.

    atorreno

    (@atorreno)

    Digging into your code I see this
    $token = $this->_wp_twitter_oauth->getRequestToken( $auth_redirect );

    which generates this error
    SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

    atorreno

    (@atorreno)

    This looks promising: I will try it once I get home

    atorreno

    (@atorreno)

    Plugin Author Aaron D. Campbell

    (@aaroncampbell)

    The only thing between clicking the link and getting redirected is a request to Twitter to get the request token. If this fails the redirect wouldn’t happen. I added some code to the dev version of the plugin over on GitHub that will display the error if one occurs. Can you try using that version and tell me what errors you’re getting?
    https://github.com/OpenRange/twitter-widget-pro/archive/master.zip

    Thanks.

    atorreno

    (@atorreno)

    I get the same thing that I got by tinkering with your code

    SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

    According to this:
    http://richardwarrender.com/2007/05/the-secret-to-curl-in-php-on-windows/

    I have a few extra steps in Windows before I can make the remote call to Twitter.

    I’m too far down the rabbit hole at this point. Is your code eventually using cURL? Can you point me in the right direction as to where I insert the fix mentioned in the Richard Warrender blog post?

    atorreno

    (@atorreno)

    k, figured it out.

    Apparently, wp_remote_get() doesn’t have up-to-date certificate authorities, or perhaps doesn’t have any at all, so it can’t verify ssl certificates. I suppose this is Windows-specific? Not sure.

    This article talks about it
    http://wordpress.stackexchange.com/questions/21749/what-is-the-relationship-between-curl-wordpress-and-cacert-pem

    So the two options are to install certificate authorities, which I couldn’t figure out, or to turn off ssl verification

    in twitter-widget-pro/lib/wp-twitter.php
    find this
    $resp = wp_remote_get($request_url);
    and change to this
    $resp = wp_remote_get($request_url, array('sslverify'=>false));

    just in case I also changed this
    $resp = wp_remote_request($request_url, array( 'method'=>$method, 'body'=>$parameters));
    to this
    $resp = wp_remote_request($request_url, array( 'method'=>$method, 'body'=>$parameters, 'sslverify'=>false));

    joernesdohr

    (@joernesdohr)

    I had the same issue. Your suggested changes in wp-twitter.php fixed it, thanks atorreno for your work! Also, thank you Aaron for this great plugin 🙂

    Lizzan

    (@lizzan)

    Hi,

    I’m having the same problem, using Apache 2.2.11, PHP 5.2.9-2, WP 3.5.0 and Twitter Widget Pro 2.5.2 on Windows Server. When trying the dev version I get the error message “There are no HTTP transports available which can complete the requested request.”

    When trying to “Authorize New Account” on my developer machine (Mac OS 10.8.2, Apache, PHP 5.2.17, same wordpress and plugin versions) I get
    “Could not recognize the response from Twitter”

    atorrenos suggested fixes make no difference.

    Any suggestions?

    Lizzan

    (@lizzan)

    Well, it seems to work on my Mac now, I had apparently managed to remove the callback url even though it looked like it was still there before. Still no luck on the Windows Server installation.

    Lizzan

    (@lizzan)

    Problem solved on the Windows server as well – needed to activate cURL in php.ini.

    hash73

    (@hash73)

    Having exactly the same issue…Apache server and tried the amends above but no joy. Can the author shed any light?

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Authorize New Account does not redirect’ is closed to new replies.