Created
December 29, 2015 21:50
-
-
Save Gazer/7e1d2d19fee260f4b1c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
super.onViewCreated(view, savedInstanceState); | |
ButterKnife.inject(this, view); | |
callbackManager = CallbackManager.Factory.create(); | |
facebookLoginButton.setFragment(this); | |
facebookLoginButton.registerCallback(callbackManager, presenter); | |
presenter.bindView(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onSuccess(LoginResult loginResult) { | |
// do something with the facebook result and notify UI. | |
// here you can store the FB UserID on a backend | |
} | |
@Override | |
public void onCancel() { | |
view().showLoginError("canceled"); | |
} | |
@Override | |
public void onError(FacebookException error) { | |
view().showLoginError("error " + error); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment