IOS SDK
(Difference between revisions)
Dirceu.tiegs (Talk | contribs) (Created page with "= Download and Setup the SDK = You can download and setup the SDK using our iOS SDK Setup guide. = Social Login = Add the following statement to your ViewController: ...") |
Dirceu.tiegs (Talk | contribs) |
||
Line 5: | Line 5: | ||
= Social Login = | = Social Login = | ||
− | + | After setting up the SDK ([[iOS SDK Setup]]), add the following statement to your ViewController: | |
#import <SocialID/SocialID.h> | #import <SocialID/SocialID.h> | ||
Line 17: | Line 17: | ||
}]; | }]; | ||
− | + | ... and call the following code to make the user log in with Google+: | |
[SIDGoogle logInGoogle:^(NSString *accessToken) { | [SIDGoogle logInGoogle:^(NSString *accessToken) { | ||
Line 24: | Line 24: | ||
// do something | // do something | ||
}]; | }]; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Logout = | = Logout = |
Revision as of 18:50, 17 October 2014
Contents |
Download and Setup the SDK
You can download and setup the SDK using our iOS SDK Setup guide.
Social Login
After setting up the SDK (iOS SDK Setup), add the following statement to your ViewController:
#import <SocialID/SocialID.h>
Call the following code to make the user log in with Facebook:
[SIDFacebook logInWithPermissions:@[@"public_profile",@"email",@"user_birthday"] success:^(SIDSignIn *signIn) { NSLog(@"Logged in Facebook!"); } failure:^(NSError *error) { // do something }];
... and call the following code to make the user log in with Google+:
[SIDGoogle logInGoogle:^(NSString *accessToken) { NSLog(@"Logged in Google!"); } failure:^(NSError *error) { // do something }];
Logout
COMING SOON...
Get the user profile
COMING SOON...