I implemented Facebook Login functionality in my android app. But there is a unwanted behaviour that appears.
loginButton.registerCallback(callbackManager,
object : FacebookCallback<LoginResult> {
override fun onSuccess(result: LoginResult?) {
Log.d("mytag", "onSuccess: ${result?.accessToken?.userId}")
}
override fun onCancel() {
}
override fun onError(error: FacebookException?) {
}
})
So when onSuccess is called, everything is okay, i get the userId. But internally this saves some user authentication data inside SharedPreferences. Which is not what i want, my intention is to get only userId and send it to my server and that is it. (I mean it is not actually my aim to use facebook login for app, i just want to get userProfile image and send it to server).
How can i achieve this result?