我是使用https://parse.com/docs/server/guide作为指南从 Parse 迁移到 Heroku(带 MongoLab 沙箱)的众多用户之一。
迁移进展顺利(可以通过远程仓库上的 REST 命令创建/检索对象),直到我尝试使用(iOS)Facebook 登录。
方法:
[PFFacebookUtils logInInBackgroundWithReadPermissions: ... ]
在 Parse 托管时一直在工作,现在返回以下错误:
[Error]: Facebook auth is invalid for this user. (Code: 101, Version: 1.12.0)
注意:对我(以前工作的)iOS 代码的唯一更改是将 Parse 服务器指向我新的手动托管的存储库,如下所示:
let parseConfiguration = ParseClientConfiguration(block: { (ParseMutableClientConfiguration) -> Void in
ParseMutableClientConfiguration.applicationId = "<*APP ID*>"
ParseMutableClientConfiguration.clientKey = "<*CLIENT KEY*>"
ParseMutableClientConfiguration.server = "https://<*HEROKU APP ID*>.herokuapp.com/parse"
})
Parse.initializeWithConfiguration(parseConfiguration)
& 对开源 Parse Server 代码 ( https://github.com/ParsePlatform/parse-server-example ) 的唯一修改是替换配置以匹配我的 Parse / mongo 标识:
var api = new ParseServer({
databaseURI: 'mongodb://<*UNIUQUE ID*>' || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: '<*PARSE APP ID*>',
masterKey: '<*PARSE MASTER KEY*>'
});