0

Here is my code. but it got failed and not grant me to do further process. let me know what is wrong in this.

ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[accountStore requestAccessToAccountsWithType:accountType 
              options: @{ACFacebookAppIdKey:       @"640154745965666", 
                         ACFacebookPermissionsKey: [NSArray arrayWithObjects:@"email", nil],
                         ACFacebookAudienceKey:    ACFacebookAudienceFriends
                        }
              completion:^(BOOL granted, NSError *error) {
                if(granted){
                  NSLog(@"granted");
                }
                else {
                  NSLog(@"fail ");
                }
              }];
Roemer
  • 3,566
  • 1
  • 16
  • 32
Vibhooti
  • 1,193
  • 2
  • 9
  • 20

1 Answers1

0

This happens when authenticating using iOS6 Accounts API. All you have to do to get it working is: - log in to the developers.facebook.com - set your app to be an iOS Native app - type in your app's bundle ID.

Vibhooti
  • 1,193
  • 2
  • 9
  • 20