Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using LinkedIn to share the images. I need to login at first time after that it needs to save the LinkedIn credentials in the app. When i run the app next time again LinkedIn Login will display. How can i solve this problem.

enter image description here

I have saved the access token and passing that value, but still i am getting the error message like this "The partner did not properly implement the authentication protocol"

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
170 views
Welcome To Ask or Share your Answers For Others

1 Answer

When you fetch the accessToken:

self.accessToken = [[OAToken alloc] initWithHTTPResponseBody:responseBody];

Save it in the user defaults so next time you can use it to avoid re-login:

[[NSUserDefaults standardUserDefaults] setObject:responseBody forKey:@"accessToken"];

Access back the accessToken:

NSString* accessToken = [[NSUserDefaults standardUserDefaults] valueForKeyPath:@"accessToken"];

OAMutableURLRequest *request =[[OAMutableURLRequest alloc] initWithURL:url consumer:self.consumer token:[[OAToken alloc] initWithHTTPResponseBody:accessToken]];

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...