1

I have used the hammock library for Linkedin access in my windows mobile application. I modified the twitter Hammock library for linked access.After access token it stated that.

"oauth_token=538e6cce-7fb4-40f7-baab-1a1dc73af28d&oauth_token_secret=8cc5c61b-aca1-44ba-b1c3-9b55f1945b9c&oauth_expires_in=0&oauth_authorization_expires_in=0"

Here, in access token step I have noticed that "oauth expires in = 0".

So, is it an issue becouse of oauth library ? I searched many websites and tried a lot.

after the following code I got this error.

          var client = new RestClient
        {
            Authority = "https://api.linkedin.com/uas/oauth",
            Credentials = credentials,
            HasElevatedPermissions = true
        };

        var request = new RestRequest
        {
            Path = "/accessToken",
            Credentials = credentials
        };
        client.BeginRequest(request, new RestCallback(RequestAccessTokenCompleted));

After getting that access token I got the linkedin login page for authorization. I want to post a link in linken share. When i give post method i got error in the following code. I modified the twitter library for this. Kindly guide me..

             _client = new RestClient
        {
            Authority = "http://api.linkedin.com/v1",
            Credentials = _credentials,
            HasElevatedPermissions = true,
          // Method = WebMethod.Post
        };
    }

    public void NewTweet(string tweetText)
    {
        if (!_authorized)
        {
            if (ErrorEvent != null)
                ErrorEvent(this, EventArgs.Empty);
            return;
        }

        var request = new RestRequest
        {
            Credentials = _credentials,
            Path = "/people/~/shares",
            Method = WebMethod.Post
        };

       // _client.AddHeader("Content-Type", tweetText);
        _client.AddParameter("Content-Type", tweetText);

        _client.BeginRequest(request, new RestCallback(NewTweetCompleted));
    }
Vishal Suthar
  • 17,013
  • 3
  • 59
  • 105
SENTHIL KUMAR
  • 647
  • 4
  • 17

1 Answers1

0

When the token expires in "0", it means the token is good indefinitely, or until the user deauthorizes it. Go ahead and use that token for your OAuth calls and it will work for you.

Kirsten Jones
  • 2,681
  • 1
  • 17
  • 20
  • Thank you Jones..After getting that access token I got the linkedin login page for authorization. I want to post a link in linken share. When i give post method i got error in the following code. I modified the twitter library for this. Kindly help me.. – SENTHIL KUMAR Feb 14 '12 at 14:09