我正在使用 ionic 和 Backand 开发应用程序,并且正在使用带有 Backand 服务的社交帐户登录。社交登录过程还可以,但我想从 Facebook 和 Google plus 获取 ID 以获取个人资料图片。我在 Backand 的支持下交谈,我知道在 Security and Auth 中有一个动作“beforesocialSignUp”,我没有评论获取数据的行:
'use strict';
function backandCallback(userInput, dbRow, parameters, userProfile) {
// get facebook id and put in fuid field that you need to add to your user object
userInput.fuid = parameters.socialProfile.additionalValues.id;
// get gender from facebook and put in gender field that you need to add to your user object
// userInput.gender = parameters.socialProfile.additionalValues.gender;
}
而且我已经在我的用户对象中创建了 fuid 字段,但是,当我使用 Facebook 或 Google+ 登录时,它什么也没有保存。登录正常,但我无法获取 ID 数据。
任何想法?