ios - FBSDKLoginManager loginWithReadPermissions -
fbsdkloginmanager *loginmanager = [[fbsdkloginmanager alloc] init]; [loginmanager loginwithreadpermissions:@[@"email"] fromviewcontroller:self handler:^(fbsdkloginmanagerloginresult *result, nserror *error) { if (error) { // process error nslog(@"error"); } else if (result.iscancelled) { // handle cancellations nslog(@"is cancelled"); } else { // if ask multiple permissions @ once, // should check if specific permissions missing if ([result.grantedpermissions containsobject:@"email"]) { // work } } }];
this basic login request. when run in simulator, works, when run on device, brings safari dialog says "login facebook account connect xxxapp". put in credentials (i admin on facebook app) dialog gets cleared , sits there. if put in wrong password, says wrong password. not asking special permissions not default. why go login dialog each time? help?
figured out. article explains perfectly, follow step step, don't miss anything, , work.
Comments
Post a Comment