我正在尝试使用ParseFacebookUtilsV4
通过Facebook登录,并不断收到错误消息:Error Domain=Parse Code=0 "unauthorized" UserInfo={error=unauthorized, NSLocalizedDescription=unauthorized, temporary=0}
。
我只是从Parse迁移到back4app,并且没有更改太多代码,至少与登录有关。我已经在back4app中输入了所有密钥,并使用以下命令重新路由服务器:
let configuration = ParseClientConfiguration {
$0.applicationId = "appID"
$0.clientKey = "clientID"
$0.server = "https://parseapi.back4app.com"
}
Parse.initializeWithConfiguration(configuration)
我该如何解决?
最佳答案
据我所知,swift的初始化设置略有变化,如果您这样做,它似乎可以工作:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let configurationOptions = ParseClientConfiguration {
$0.applicationId = "APP_ID"
$0.clientKey = "CLIENT_KEY"
$0.server = "https://parseapi.back4app.com"
}
Parse.initialize(with: configurationOptions)
return true
}