Mac OS X Facebook登录失败-应用程序未存储remote_app_id [英] Mac OS X Facebook login failed - no stored remote_app_id for app

查看:68
本文介绍了Mac OS X Facebook登录失败-应用程序未存储remote_app_id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Mac OS X 10.8上的新ACAccountStore功能通过Facebook登录,但出现错误:

I am trying to use the new ACAccountStore capabilities on Mac OS X 10.8 to login via Facebook but I get an error:

Facebook服务器无法满足此访问请求:没有为应用存储的remote_app_id

The Facebook server could not fulfill this access request: no stored remote_app_id for app

当代码执行requestAccessToAccountsWithType消息时,它的确提示我访问Facebook(允许),并且确实在我的设置"中存储了Facebook凭据.我还为OS X的旧版本提供了另一个代码路径,该版本使用WebView控件登录到Facebook.它确实可以使用相同的APP_ID.因此,我应该在Facebook开发人员设置中正确设置该应用程序.还有其他我缺少的配置吗?我在互联网上搜索"remote_app_id",然后我得到了空集.

When the code executes the requestAccessToAccountsWithType message it does prompt me for access to Facebook (which I allow) and I do have Facebook credentials stored in my Settings. I also have another code path for legacy versions of OS X which logs into Facebook using the WebView control. It does work with the same APP_ID. So I should have the app correctly setup in the Facebook developer settings. In there some other configuration that I'm missing? I search on the Internet for "remote_app_id" and I get the empty set.

    ACAccountStore *account = [[ACAccountStore alloc] init];
    ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
    
    NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: FB_APP_ID, ACFacebookAppIdKey, [NSArray arrayWithObjects:@"email", nil], ACFacebookPermissionsKey, ACFacebookAudienceFriends, ACFacebookAudienceKey, nil];
    
    [account requestAccessToAccountsWithType:accountType options:options completion:^(BOOL granted, NSError *error) {
        if (granted) {
            NSArray *accountList = [account accountsWithAccountType:accountType];
            
            for (ACAccount *thisAccount in accountList) {
                NSLog(@"Found account: %@", [thisAccount accountDescription]);
            }
        }
        else {
            NSLog(@"Not granted because: %@", [error localizedDescription]);
        }
    }];


对iPhone开发者的有用说明:100%展示此问题:

关于iPhone上的同一问题(此页面是该网站的主要Google登陆信息):问题是这样的:在iPhone上,依次转到设置",左侧菜单Facebook,然后在右侧的用户名/密码-登录到Facebook.这就是设置Facebook登录名".如果iPhone实际上是通过设置Facebook登录" 登录到FB,则问题将会出现.如果您明确登出设置Facebook登录名",(甚至确实卸载了FacebookApp),该问题就不会出现.


useful note for iPhone devs: to exhibit this problem 100%:

Regarding the same issue on the iPhone (this page is the main google landing for that): The issue is this: on the iPhone, go to Settings, left menu Facebook, then on the right username/password - login to Facebook. So that's the "Settings Facebook Login". If the iPhone is in fact logged in to FB on the "Settings Facebook Login" then the problem will exhibit. If you explicitly log out on "Settings Facebook Login" (and indeed, perhaps uninstall the FacebookApp), the problem will not exhibit.

推荐答案

好像您必须在Facebook应用程序设置中设置iOS/OSX应用程序的捆绑包ID(在我的情况下是固定的)

Looks like you have to set bundle ID of your iOS/OSX app in Facebook app settings (that fixed thing in my case)

这篇关于Mac OS X Facebook登录失败-应用程序未存储remote_app_id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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