Latest 0.0.3
Homepage https://github.com/pj4533/AFLinkedInOAuth1Client
License MIT
Platforms ios 5.0, requires ARC
Dependencies AFOAuth1Client
Authors

An AFOAuth1Client subclass for easily authenticating with LinkedIn.

Instructions

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);
                                                }];

Details for LinkedIn

Two problems occur from the base AFOAuth1Client implementation, onlined on this page.

  • Content-Type needs to be text/xml. Don’t think thats in the OAuth spec…
  • "Properly handling oauth_token_secret"

Contact

PJ Gray

License

AFLinkedInOAuth1Client is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AFLinkedInOAuth1Client",
    "version": "0.0.3",
    "summary": "AFOAuth1Client for LinkedIn.",
    "homepage": "https://github.com/pj4533/AFLinkedInOAuth1Client",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "PJ Gray": "[email protected]"
    },
    "source": {
        "git": "https://github.com/pj4533/AFLinkedInOAuth1Client.git",
        "tag": "0.0.3"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": "AFLinkedInOAuth1Client",
    "requires_arc": true,
    "dependencies": {
        "AFOAuth1Client": [
            "~> 0.2.0"
        ]
    }
}

Pin It on Pinterest

Share This