iOS 6 - Facebook共享程序失败,出现错误“代理应用尚未安装” [英] iOS 6 - Facebook sharing procedure fails with error "The proxied app is not already installed"

查看:113
本文介绍了iOS 6 - Facebook共享程序失败,出现错误“代理应用尚未安装”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管如此,有一个问题 Facebook错误(7)iOS 6 它是已经关闭没有任何答案!
在获取访问用户的Facebook帐户时,我有一个错误:
错误是:错误Domain = com.apple.accounts代码= 7Facebook服务器无法实现此访问请求:代理的应用程序尚未安装。 UserInfo = 0xa260270 {NSLocalizedDescription = Facebook服务器无法完成此访问请求:代理的应用程序尚未安装。}

Though, there is such a question Facebook Error (7) iOS 6 it's already closed without any answer! While obtaining an access to user's facebook account I've got an error: error is: Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The proxied app is not already installed." UserInfo=0xa260270 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The proxied app is not already installed.}

我是执行这样的请求:

self.statusLabel.text = @"Waiting for authorization...";
if (self.accountStore == nil) {
    self.accountStore = [[ACAccountStore alloc] init];
}   
ACAccountType * facebookAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];

NSDictionary * dict = @{ACFacebookAppIdKey : FB_APP_ID, 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);
    }
}];

这个错误是什么意思?

推荐答案

我已经解决了这个问题!
这是因为我没有传递权限数组!
虽然 ACAccountStore 类声明这个参数是可选的,但不是!

I've solved this problem! It was because I do not pass permissions array! Though the ACAccountStore class states that this parameter is optional, it is not!

更多应用程序可以启动并请求基本权限(如所暗示的)!

More over the application could launch and ask for basic permissions(as it is implied)!

所以,你必须总是传递一个权限数组。

So, you must always pass a permissions array.

这里还有一个帐户存储返回的错误代码的描述:

Here's also a description of error codes returned by account store:

typedef enum ACErrorCode {
   ACErrorUnknown = 1,
   ACErrorAccountMissingRequiredProperty,
   ACErrorAccountAuthenticationFailed,
   ACErrorAccountTypeInvalid,
   ACErrorAccountAlreadyExists,
   ACErrorAccountNotFound,
   ACErrorPermissionDenied,
   ACErrorAccessInfoInvalid
} ACErrorCode;

(我有 ACErrorPermissionDenied

这篇关于iOS 6 - Facebook共享程序失败,出现错误“代理应用尚未安装”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆