ich den folgenden Code verwenden (dargestellt auf dem WWDC 2012 Videos):Facebook Integration Error (Accounts.framework) in iOS6
self.accountStore = [[ACAccountStore alloc] init];
ACAccountType *facebookAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
[self.accountStore requestAccessToAccountsWithType:facebookAccountType
withCompletionHandler:^(BOOL granted, NSError *e) {
if (granted)
{
NSArray *accounts = [self.accountStore
accountsWithAccountType:facebookAccountType];
self.facebookAccount = [accounts lastObject];
} else {
// Fail gracefully...
}
}];
Ich habe auch die NSDictionary
meine .plist
Datei:
Also, mein Problem ist, dass ich die folgende Ausnahme erhalte:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Access options are required for this account type.'
Ich habe mit dieser ACAccountTypeIdentifierTwitter
und ACAccountTypeIdentifierSinaWeibo
versucht. Ich erhalte keine Ausnahme, obwohl sie immer granted == NO
Seine funktioniert gut. Aber wenn wir das verwenden, fügt meine App Facebook-Standardeinstellungen hinzu. Also das Problem ist, es ist im OFF-Zustand. Gibt es dafür eine Lösung? – sathiamoorthy