Facebook Login Usage - MLSDev/LiveDataSocialAuth GitHub Wiki
Sign In
To log in with the Facebook account build a FacebookAuth object and call the signIn() method. Observe the auth result with any LifecycleOwner instance. The signIn() method returns the LiveData object with the AuthResult value type
FacebookAuth.Builder(this)
.requestEmail()
.requestProfile()
.enableSmartLock()
.build()
.signIn()
.observe(this, Observer { authResult ->
if (it.isSuccess) {
// Do your further stuff with the [authResult.account] here
} else {
// Handle the [authResult.exception] here
}
})
Call the enableSmartLock() if you want to use Smart Lock for Passwords on Android