Note that there are some explanatory texts on larger screens.

plurals
  1. POACAccountType always showing 0 accounts
    primarykey
    data
    text
    <p>I have used facebook SDK for authentication with the facebook. When there is no facebook account enabled in settings then by click on the button apps goes to safari for authentication i.e. </p> <pre><code>if (appDelegate.session.state != FBSessionStateCreated) { appDelegate.session = [[FBSession alloc] init]; } [appDelegate.session openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) { // and here we make sure to update our UX according to the new session state [self updateView]; }]; </code></pre> <p>otherwise if facebook account is enabled then </p> <pre><code> NSArray *fbAccounts=nil; ACAccountType *accountTypeFB; if ((_accountStore = [[ACAccountStore alloc] init]) &amp;&amp; (accountTypeFB = [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook] ) ){ fbAccounts = [_accountStore accountsWithAccountType:accountTypeFB]; NSLog(@" %d fbAccounts",[fbAccounts count]); } if ([fbAccounts count]!=0) { [FBSession openActiveSessionWithAllowLoginUI:YES]; NSArray *permissions = [[NSArray alloc] initWithObjects: @"email", nil]; [FBSession openActiveSessionWithReadPermissions:permissions allowLoginUI:YES completionHandler:^(FBSession *session, FBSessionState status, NSError *error) { if (error) { NSLog(@"Failure"); NSLog(@"error %@",error); } else { NSLog(@" active session opened "); if (self.gotUserDetails) { return; } [self fetchuserinfo]; } }]; } </code></pre> <p><img src="https://i.stack.imgur.com/xpaDF.png" alt="enter image description here"> }</p> <p>This image showing the alert to access user info. It is working fine in the simulator. But in device it always goes to safari or in facebook app for authentication even facebook account is enabled in the settings. Please help me out for finding this issue.</p> <p>Thanks to all.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload