我正在关注Firebase's Auth tutorial for Facebook login,其中显示了要实现的以下代码:
callbackManager = CallbackManager.Factory.create()
buttonFacebookLogin.setReadPermissions("email", "public_profile")
buttonFacebookLogin.registerCallback(callbackManager, object : FacebookCallback<LoginResult> {
override fun onSuccess(loginResult: LoginResult) {
Log.d(TAG, "facebook:onSuccess:$loginResult")
handleFacebookAccessToken(loginResult.accessToken)
}
override fun onCancel() {
Log.d(TAG, "facebook:onCancel")
// ...
}
override fun onError(error: FacebookException) {
Log.d(TAG, "facebook:onError", error)
// ...
}
})
但是,无法识别handleFacebookAccessToken()
:
这是为什么?