parse.com - IOS Parse's Anypic Installation -
i have downloaded parse's app, anypic, cannot run on phone. have completed of required steps , says "build succeeded" when run it.
however, shows black screen , facebook "login" button. when button clicked, can login facebook changes button "log out" not wha
i have attached picture warnings get. warnings issue or there else need change in code? thanks!
you should change handlefacebooksession part this:
- (void)handlefacebooksession { if ([pfuser currentuser]) { if (self.delegate && [self.delegate respondstoselector:@selector(loginviewcontrollerdidloguserin:)]) { [self.delegate performselector:@selector(loginviewcontrollerdidloguserin:) withobject:[pfuser currentuser]]; } return; } nsarray *permissionsarray = @[ @"public_profile", @"user_friends", @"email"]; self.hud = [mbprogresshud showhudaddedto:self.view animated:yes]; // login pfuser using facebook [pffacebookutils loginwithpermissions:permissionsarray block:^(pfuser *user, nserror *error) { if (!user) { nsstring *errormessage = nil; if (!error) { nslog(@"uh oh. user cancelled facebook login."); errormessage = @"uh oh. user cancelled facebook login."; } else { nslog(@"uh oh. error occurred: %@", error); errormessage = [error localizeddescription]; } uialertview *alert = [[uialertview alloc] initwithtitle:@"log in error" message:errormessage delegate:nil cancelbuttontitle:nil otherbuttontitles:@"dismiss", nil]; [alert show]; } else { if (user.isnew) { nslog(@"user facebook signed , logged in!"); } else { nslog(@"user facebook logged in!"); } if (!error) { [self.hud removefromsuperview]; if (self.delegate) { if ([self.delegate respondstoselector:@selector(loginviewcontrollerdidloguserin:)]) { [self.delegate performselector:@selector(loginviewcontrollerdidloguserin:) withobject:user]; } } } else { [self cancellogin:error]; } } }];}
found here.
Comments
Post a Comment