3
votes

I am having trouble getting the request token from LinkedIn. I keep on getting the same error ecxeption "Communication with the service provider failed: https://api.linkedin.com/uas/oauth/requestToken"

I dont know why this is happening as it used to work fine previously. but now that i am trying it with the same code some time back, it just wont work. My code is following:

public final  LinkedInOAuthService oAuthService = LinkedInOAuthServiceFactory
.getInstance().createLinkedInOAuthService(CONSUMER_KEY,
        CONSUMER_SECRET);
       public static final String OAUTH_CALLBACK_URL = "x-oauthflow-linkedin"
        + "://" + "litestcalback";    
    try
    {

    liToken = oAuthService.getOAuthRequestToken(OAUTH_CALLBACK_URL);
    Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(liToken
            .getAuthorizationUrl()));
    startActivity(i);
    }catch (Exception e) {
        // TODO: handle exception

    liToken = null;}

Please can anyone tell me what I am doing wrong.

1
did you found any solution for this? I'm also facing the same issue. - Misha Bhardwaj
i think i had to correct the date and time of my device. It started working then. Hope that works for you too. - SoH
You comment helped me to solve this issue pls add it in answer. - Auto-Droid ツ

1 Answers

0
votes

I think i had to correct the date and time of my device. It started working then. Hope that works for you too.