AFOAuthSignInViewController is an easy way to create ViewController for Web Services which need to sign in without switching to Mobile Safari.
- Install with CocoaPods or clone
#import "AFOAuthSignInViewController.h".- Create the ViewController by using
[AFOAuthSignInViewController alloc]initWithOAuthClientType:<#(AFOAuthClientType)#> baseURL:<#(NSURL *)#> key:<#(NSString *)#> secret:<#(NSString *)#> verifyParameter:<#(NSString *)#> requestTokenPath:<#(NSString *)#> userAuthorizationPath:<#(NSString *)#> callbackURL:<#(NSURL *)#> accessTokenPath:<#(NSString *)#> accessMethod:<#(NSString *)#> scope:<#(NSString *)#>]; - set Delegate to appropriate Class.
- use
- (void)signInViewController:(AFOAuthSignInViewController *)viewController didGetAccessPermissionWithClient:(id)client attributes:(NSDictionary *)attributesto retrieves the AFOAuthClient and attributes of the User.