Skip to content

Instantly share code, notes, and snippets.

@ethanmick
Created December 14, 2012 18:56
Show Gist options
  • Save ethanmick/4287674 to your computer and use it in GitHub Desktop.
Save ethanmick/4287674 to your computer and use it in GitHub Desktop.
Login socially with the CloudMine iOS framework.
// In MyLoginViewController.m
- (IBAction)loginWithSocial {
// Don't need username/password because we are logging in socially.
CMUser *myNewUser = [[CMUser alloc] init];
[myNewUser loginWithSocialNetwork:CMSocialNetworkTwitter viewController:self params:nil callback:^(CMUserAccountResult resultCode, NSArray *messages) {
if (resultCode == CMUserAccountLoginSucceeded) {
NSLog(@"We have successfully logged in!");
}
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment