TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Mar 2015 |
Maintained by Unclaimed.
An AFOAuth1Client subclass for easily authenticating with LinkedIn.
Register your application to launch from a custom URL scheme, and use that with the path /success
as your callback URL.
Here's how it all looks together:
AFLinkedInOAuth1Client *linkedinClient = [[AFLinkedInOAuth1Client alloc] initWithBaseURL:[NSURL URLWithString:@"https://api.linkedin.com/"]
key:@"KEY"
secret:@"SECRET"];
[linkedinClient authorizeUsingOAuthWithRequestTokenPath:@"uas/oauth/requestToken"
userAuthorizationPath:@"uas/oauth/authorize"
callbackURL:[NSURL URLWithString:@"x-yourscheme://success"]
accessTokenPath:@"uas/oauth/accessToken"
accessMethod:@"POST"
success:^(AFOAuth1Token *accessToken) {
NSLog(@"Success: %@", accessToken);
} failure:^(NSError *error) {
NSLog(@"Error: %@", error);
}];
Two problems occur from the base AFOAuth1Client implementation, onlined on this page.
PJ Gray
AFLinkedInOAuth1Client is available under the MIT license. See the LICENSE file for more info.