Skip to content

Instantly share code, notes, and snippets.

@shepting
shepting / upload.m
Created January 28, 2015 23:50
Upload an image using Twitter Fabric
[[Twitter sharedInstance] logInWithCompletion:^(TWTRSession *session, NSError *error){
// Ensure the auth worked
if (session) {
NSLog(@"Twitter Session %@ / %@ found", session.authToken, session.authTokenSecret);
} else {
NSLog(@"Login error: %@", error);
}
// Get a random image
UIImage *corgiImage = [UIImage imageNamed:@"Corgis_Small.jpeg"];