Forums

WordPress Dashboard Twitter
[resolved] 'Could not connect to Twitter.' when clicking sign in (5 posts)

  1. lordnynex
    Member
    Posted 12 months ago #

    The above error is displayed after clicking 'Sign into twitter' from the dashboard.

    The corresponding errors (site name removed because it's a dev site) are below:

    [Mon May 30 23:13:22 2011] [error] [client 75.142.**.***] PHP Notice: Undefined index: oauth_token in /var/www/WEBSITE.com/DEV/wp-content/plugins/wordpress-dashboard-twitter/inc/twitteroauth.php on line 82, referer: http://dev.WEBSITE.com/wp-admin/index.php
    [Mon May 30 23:13:22 2011] [error] [client 75.142.**.***] PHP Notice: Undefined index: oauth_token_secret in /var/www/WEBSITE.com/DEV/wp-content/plugins/wordpress-dashboard-twitter/inc/twitteroauth.php on line 82, referer: http://dev.WEBSITE.com/wp-admin/index.php
    [Mon May 30 23:13:22 2011] [error] [client 75.142.**.***] PHP Notice: Undefined index: oauth_token in /var/www/WEBSITE.com/DEV/wp-content/plugins/wordpress-dashboard-twitter/inc/connect.php on line 19, referer: http://dev.WEBSITE.com/wp-admin/index.php
    [Mon May 30 23:13:22 2011] [error] [client 75.142.**.***] PHP Notice: Undefined index: oauth_token_secret in /var/www/WEBSITE.com/DEV/wp-content/plugins/wordpress-dashboard-twitter/inc/connect.php on line 20, referer: http://dev.WEBSITE.com/wp-admin/index.php

  2. www.agentstaobao.com
    Member
    Posted 12 months ago #

    yes i find the question as you say

  3. lordnynex
    Member
    Posted 12 months ago #

    This issue seems to be caused by Twitter API handing back a 401 response during the whole getRequestToken bit.

    Twitter seems to be returning 'Failed to validate oauth signature and token'

    After digging, I realize this is the same issue I've had in different applications.

    The problem here is the nonce that is generated contains a timestamp. If the server time is not up to date than the validation portion fails on their side. Not entirely sure how you can catch that in code but if it comes up again, that is indeed the place to start.

  4. lordnynex
    Member
    Posted 12 months ago #

    I guess I should be a little more clear for other users:

    The problem is your system time is off. To fix this, you or your system admin or hosting company needs to run '/usr/sbin/ntpdate pool.ntp.org'.

  5. Alphawolf
    Member
    Posted 12 months ago #

    lordnynex, may I ask who you are talking with? You were the topic starter. :)

    Well, so do I get it right that the issue was caused by a server time misconfiguration?

Reply

You must log in to post.

About this Plugin

About this Topic