Skip to content

shinydevelopment/AFOAuth1Client

This branch is 81 commits behind AFNetworking/AFOAuth1Client:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b98d401 · May 7, 2013

History

84 Commits
Jan 1, 2013
Jan 21, 2013
May 7, 2013
May 7, 2013
Jan 21, 2013
Dec 28, 2011
Aug 1, 2012
May 7, 2013
Dec 27, 2011
Jan 21, 2013

Repository files navigation

AFOAuth1Client

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:

AFOAuth1Client *twitterClient = [[[AFOAuth1Client alloc] initWithBaseURL:[NSURL URLWithString:@"https://twitter.com/oauth/"] key:@"..." secret:@"..."] autorelease];
    
// Your application will be sent to the background until the user authenticates, and then the app will be brought back using the callback URL
[twitterClient authorizeUsingOAuthWithRequestTokenPath:@"/request_token" userAuthorizationPath:@"/authorize" callbackURL:[NSURL URLWithString:@"x-com-YOUR-APP-SCHEME://success"] accessTokenPath:@"/access_token" success:^(AFOAuth1Token *accessToken) {
    NSLog(@"Success: %@", accessToken);
} failure:^(NSError *error) {
    NSLog(@"Error: %@", error);
}];

Contact

Mattt Thompson

License

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

About

AFNetworking Extension for OAuth 1.0a Authentication

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 98.2%
  • Ruby 1.8%