IOS: Easy Facebook SDK email retrieval Objective C -


edit (rewording question because didn't make sense before.)

i have loginviewcontroller has following ibaction:

-(ibaction)fblogin:(id)sender {     fbsdkloginmanager *login = [[fbsdkloginmanager alloc] init];     [login loginwithreadpermissions:@[@"email"] handler:^(fbsdkloginmanagerloginresult *result, nserror *error) {         if (error) {             // process error         } else if (result.iscancelled) {             // handle cancellations         } else {             // if ask multiple permissions @ once,             // should check if specific permissions missing             if ([result.grantedpermissions containsobject:@"email"]) {                 if ([fbsdkaccesstoken currentaccesstoken]) {                     [[[fbsdkgraphrequest alloc] initwithgraphpath:@"me" parameters:nil]                      startwithcompletionhandler:^(fbsdkgraphrequestconnection *connection,                                                   id result, nserror *error) {                          if (!error) {                              nslog(@"fetched user:%@", result);                           }                      }];                 }                 isfb = true;                 [self closepopup];             }         } }]; 

so... i've got of user data... how use it?

you launching asynchronous task, because of latency (network, server time response etc...), 'result' after execution of application instructions.

if it's problem mean, can add nsnotification in app. when fb request ends, can fire notification , email need. sure, have process late answer then. example, reloading view after setting uitextfield email value. need ?


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -