-2
Whenever I start the application this error appears:
Attempt to invoke virtual method 'void com.facebook.login.widget.LoginButton.registerCallback(com.facebook.CallbackManager, com.facebook.FacebookCallback)' on a null object reference.
Follows part of the code:
login.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@SuppressLint("SetTextI18n")
@Override
public void onSuccess(LoginResult loginResult) {
It’s probably Java on Android, if that’s the case you probably added the code BEFORE
setContentView
, soon the elements as widgets are not yet ready, but I have no psychic powers, I can not know how this your code at the moment, so I have no help beyond this, the only way to be sure is if you follow the rules of the site and always create a minimal example, Complete and verifiable: https://answall.com/help/minimal-reproducible-example– Guilherme Nascimento
Thank you Guiherme helped me so much !!!!
– Murillo Rodrigues da Silva
Blz Urilo, I formulated in response, if you think this OK mark it as correct, grateful!
– Guilherme Nascimento