gpt4 book ai didi

iOS 6 Facebook 不工作

转载 作者:行者123 更新时间:2023-11-28 22:34:05 24 4
gpt4 key购买 nike

我正在使用这段代码:

_accountStore = [ACAccountStore new];

ACAccountType *facebookTypeAccount =
[_accountStore accountTypeWithAccountTypeIdentifier:
ACAccountTypeIdentifierFacebook];

NSArray *accounts =
[_accountStore accountsWithAccountType:
facebookTypeAccount];

_facebookAccount = [accounts lastObject];

[_accountStore requestAccessToAccountsWithType:facebookTypeAccount
options:@{ACFacebookAppIdKey:myKey, ACFacebookPermissionsKey:@[@""]}
completion:^(BOOL granted, NSError *error) {
if(granted)
{
NSArray *accounts = [_accountStore accountsWithAccountType:facebookTypeAccount];
_facebookAccount = [accounts lastObject];
NSLog(@"Success");

[self parseUserDataWithCompletion:completion];
}
else
{
NSLog(@"Error: %@", error);

[self parseUserDataWithCompletion:completion];
}
}];

在设备上工作得很好。但是在模拟器上运行报错:

Error Domain=com.apple.accounts Code=7 "The operation couldn’t be completed. (com.apple.accounts error 7.)"

更新:它也不适用于设备。

它曾经有效。但现在不是了……发生了什么事? fb 改变了什么吗?

最佳答案

已解决。问题是:

ACFacebookPermissionsKey:@[@""]

必须改为

ACFacebookPermissionsKey:@[]

关于iOS 6 Facebook 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16615158/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com