alfdev / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

problems with stored access tokens in android #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Fetch access tokens of a user for the first time using signpost library. And 
Storing them
2. Using these tokens later and post a share using LinkedInApiClient class
3. post share with LinkedInApiClient's object . postShare() method.

What is the expected output? What do you see instead?
Expected Output: The share is updated in user's linkedin profile.
Current output: com.google.code.linkedinapi.client.LinkedInApiClientException: 
java.io.IOException: Received authentication challenge is null
it's in android Logcat and in web browser I can't see status updated

What version of the product are you using? On what operating system?
Android 1.1, with Signpost library for o auth. 

Please provide any additional information below.
It works well if user need to authorize my application every time but when i 
skip this step and use stored tokens instead I was thrown an error

Original issue reported on code.google.com by newfoxra...@gmail.com on 3 Nov 2010 at 9:30

GoogleCodeExporter commented 9 years ago
Just realized there was a typo 

What version of the product are you using? On what operating system?
Android 1.1, with Signpost library for o auth. 

Sorry its 2.1 

However other information is same.

Original comment by it.er.ne...@gmail.com on 12 Nov 2010 at 8:50

GoogleCodeExporter commented 9 years ago
I've got the same issue on Motorola XOOM (Android 3.2.1)

Original comment by I.Shak...@gmail.com on 14 Oct 2011 at 2:03

GoogleCodeExporter commented 9 years ago
Hello there!

I'm having trouble with posting share too.

This is the error:
12-09 21:47:23.367: ERROR/Exception(7758): 
com.google.code.linkedinapi.client.LinkedInApiClientException: 
java.io.IOException: Received authentication challenge is null

This is my code:

client = mLinkedIn.createLinkedInApiClient(mAccessToken.getToken(), 
mAccessToken.getTokenSecret());
client.postShare(status, "title", "http://www.website.com", null, 
VisibilityType.ANYONE);

I have no trouble getting the tokens and both the Token and TokenSecret does 
exist.
I stored the tokens in a persistent storage and just for your info, the time 
between the execution postshare and the time I've gotten the token is just 1-2 
hours apart at most. So most probably token couldn't be expired.

Please let me know the possible issue that lead to this. Thanks, I really 
appreciate the effort you made to create this wrapper class.

Original comment by jmta...@gmail.com on 9 Dec 2011 at 2:00