Swift - How Can I handle datas from FIRUserInfo for FB Auth?

送分小仙女□ 提交于 2019-12-06 05:57:20

You have to add a for ... in to retrieve the providerData now.

if let user = FIRAuth.auth()?.currentUser {
  for profile in user.providerData {
    let providerId = profile.providerId
    let uid = profile.uid;  // Provider-specific UID
    let name = profile.displayName
    let email = profile.email
    let photoUrl = profile.photoURL
  }
} else {
  // No user is signed in.
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!