title: How to check if Facebook account exists?
body: <p>I'm trying to implement Facebook posting procedure. Can you help me to understand how do I check if the account exists in the iPhone(iOS6 feature). I saw WWDC session where they use such code:</p>
  
  <pre><code>if (self.accountStore == nil) {
      self.accountStore = [[ACAccountStore alloc] init];
  }   
  ACAccountType * facebookAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
  //Now we can obtain some extra permissions
  NSArray * permissions = @[@"publish_stream"];
  //NSArray * permissions = @[@"user_about_me"];
  NSDictionary * dict = @{ACFacebookAppIdKey : FB_APP_ID, ACFacebookPermissionsKey : permissions, ACFacebookAudienceKey : ACFacebookAudienceEveryone};
  [self.accountStore requestAccessToAccountsWithType:facebookAccountType options:dict completion:^(BOOL granted, NSError *error) {
      __block NSString * statusText = nil;
      if (granted) {
          statusText = @"Logged in";
          NSArray * accounts = [self.accountStore accountsWithAccountType:facebookAccountType];
          self.facebookAccount = [accounts lastObject];
          NSLog(@"account is: %@", self.facebookAccount);
          self.statusLabel.text = statusText;
          [self postToFeed];
      }
      else {
          self.statusLabel.text = @"Login failed";
          NSLog(@"error is: %@", error);
      }
  }];
  </code></pre>
  
  <p>But if account does not exists I'm getting an error:
  <code>Error Domain=com.apple.accounts Code=6 "The operation couldn’t be completed</code>
  May be I missed something..but I do not exactly understand what should I do. Also it will be good if you post some tutorials or links of how to use this new iOS 6 features because facebook tutorials are not so clear.</p>