WordPress.org

Support

Support » Plugins and Hacks » WP LinkedIn » [Resolved] Your LinkedIn access token is invalid or has expired

[Resolved] Your LinkedIn access token is invalid or has expired

  • Constantly being asked to get a new access token and after a few minutes being asked again.

    Tried getting a new token many times over and regenerating token, have allowed access many times. Still getting the nag in the dashboard.

    Info from LinkedIn is still showing up on front end. Just need to disable the nag.

    http://wordpress.org/plugins/wp-linkedin/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Any help on this?

    Still experiencing the issue. It is very annoying but I do not want to stop using the plugin as the recommendation feature is great.

    Plugin Author Claude Vedovini

    @cvedovini

    Hi, if you have the latest version of the plugin you should get an error message together with “invalid or expired token” message, do you?

    Hi Claude!
    I install plugin today and this error occur constantly.
    I click on regenerate, on clear cache, and error still occur.

    this is the message:
    “Your LinkedIn access token is invalid or has expired, please click here to get a new one.”
    I click and I receive two messages (together):
    “Your LinkedIn access token is invalid or has expired, please click here to get a new one.”
    …and below…
    “The access token has been successfully updated.”
    in page I put the shortcode [li_profile] and inf frontend this message occur:
    “There’s something wrong and the profile could not be retreived, please check the list of profile fields to be fetched. If everything seems good try regenerating the access token.”

    please help me

    Marcio

    Plugin Author Claude Vedovini

    @cvedovini

    what version of the plugin do you have?

    last version! I installed yestarday on my test environment.

    Plugin Author Claude Vedovini

    @cvedovini

    check the time on your server, LinkedIn gives back the token together with an expiry date and if the server’s date and time are wrong it may think the token expiry is always in the past

    Hi Claude,

    The site is hosted on hosting company. I’m checking that the server is the correct time and date. But here in São Paulo / Brazil we are in summer time. Then the server is exactly 1 hour less compared to my local time.

    Thank you again

    Marcio

    Plugin Author Claude Vedovini

    @cvedovini

    time or daylight saving time don’t matter in that case but if the server has a date set in future more than 60 days then it will calculate that the token is expired when it receives it.

    anyway, it doesn’t seem like it’s coming for that. can you give me an admin access to your install? use that contact page to send me the credentials http://vedovini.net/contact/

    Plugin Author Claude Vedovini

    @cvedovini

    any news here?

    doublesharp

    @doublesharp

    I am still having this issue – the token seems to last for about 30 seconds before expiring. Just checked the time and all is well, I did need to change my timezone from EST to PST but the Your LinkedIn access token is invalid or has expired, please click here to get a new one. message continues to appear.

    doublesharp

    @doublesharp

    Just did a bit of digging and get_transient('wp-linkedin_oauthtoken') is not returning a value. Suspecting that this is related to using transients along with Nginx, spawn-fcgi and APC.

    doublesharp

    @doublesharp

    I was able to get this to work for my by using options instead of transients (likely related to my using spawn-fcgi and APC). Storing the expiration as it’s own entry so it can be checked for validity. Updated the following in class-linkedin-oauth.php.

    get_access_token()

    return apply_filters('linkedin_oauthtoken', get_option('wp-linkedin_oauthtoken'));

    invalidate_access_token()

    delete_option('wp-linkedin_oauthtoken');

    set_access_token()

    if (isset($body->access_token)) {
        update_option('wp-linkedin_invalid_token_mail_sent', false);
        update_option('wp-linkedin_oauthtoken', $body->access_token);
        update_option('wp-linkedin_expires', time()+$body->expires);
        return true;
    }

    is_access_token_valid()

    $token = get_option('wp-linkedin_oauthtoken');
    return (!empty($token) && get_option('wp-linkedin_expires') > time());

    Plugin Author Claude Vedovini

    @cvedovini

    In that case it means you have a problem with your cache configuration and that it’s going to cause trouble in other places in WordPress

    Plugin Author Claude Vedovini

    @cvedovini

    closing

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Resolved] Your LinkedIn access token is invalid or has expired’ is closed to new replies.
Skip to toolbar