AeroGear适用于iOS的Facebook配置

问题描述 投票:2回答:2

我继承了一个应用程序,我想了解什么之间Facebook希望,什么是当前实现精确的配置差异。

In working to create a great Platform experience for everyone, we ask developers to ensure the apps they build comply with our Platform Policies. Your app APPNAME  (AppId: APPID) doesn't comply with the following:

Platform Policy 8.2: Native iOS and Android apps that implement Facebook Login must use our official SDKs for Login. 

Please make sure your iOS app is using the most recent version of our SDK for Login. You can find more information on our iOS SDK for Login and other Login-related products here: https://developers.facebook.com/docs/facebook-login/ios.

编辑:此外,Facebook还告诉我:

Thank you for reaching out and for all actions taken so far. I am still able to view the FB login using unofficial SDK [refer to screencast]. 

我的猜测是,这是由于到OAuth2的认证服务的配置。

这是设置是这样的:

private init() {
    let keycloakHost = ServerConfigurator.sharedInstance.keycloakUrl

    config = KeycloakConfig(
        clientId: "app-name-mobile",
        host: keycloakHost,
        realm: "master",
        isOpenIDConnect: true)

    config.webView = .safariViewController

    config.webViewHandler = self.webViewHandler
    oauthModule = KeycloakOAuth2Module(config: config, session: KeycloakClient.session)
     }

而aerogear OAuth的文档似乎表明不同的配置,需要为Facebook:

https://github.com/aerogear/aerogear-ios-oauth2

let facebookConfig = FacebookConfig(
    clientId: "YYY",
    clientSecret: "XXX",
    scopes:["photo_upload, publish_actions"]
)
let oauth2Module = AccountManager.addFacebookAccount(config: facebookConfig)

let http = Http()
http.authzModule = oauth2Module
http.request(method: .get, path: "/get", completionHandler: {(response, error) in
    // handle response
})

这也似乎是原开发商是通过到Safari浏览器网页视图管道输入,VS利用图书馆需要的方法。我不完全的原因要么是。我想这可能,其实是问题的原因Facebook拥有与应用程序。

任何人都可以提供一些线索对这个错误?我试图用它最有效的处理是有非常快的时间限制(每周),我甚至不知道我在这里要正确的道路。

任何意见表示高度赞赏。

编辑:我现在用的这个版本:

https://github.com/maciej-gad-benefex/aerogear-ios-oauth2

编辑:这还需要与Keycloak身份提供商整合

ios swift facebook oauth-2.0 aerogear
2个回答
1
投票

这个库是不会再被保持。最后显著变化是2年前(提交于2017年1月13日)

我真的建议你更换本作AppAuth-iOS


0
投票

它看起来像Facebook是说,你必须使用Facebook提供的SDK进行登录,所以为了遵守,你必须移动到https://developers.facebook.com/docs/facebook-login/ios

© www.soinside.com 2019 - 2024. All rights reserved.