Last active
May 14, 2019 20:29
-
-
Save adrianhall/047f32b470308ea60a70a548cdefb0bb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Register the callback for the Facebook authentication | |
LoginManager.getInstance().registerCallback(callbackManager, object : FacebookCallback<LoginResult> { | |
override fun onSuccess(result: LoginResult?) { | |
Log.d(TAG, "Facebook token = ${result?.accessToken?.token}") | |
toast("Access Token received") | |
} | |
override fun onCancel() { | |
Log.d(TAG, "Facebook authentication is cancelled") | |
toast("Facebook Authentication is cancelled") | |
} | |
override fun onError(error: FacebookException?) { | |
Log.e(TAG, "Facebook Authentication failed: ${error?.message}") | |
toast("Facebook Authentication failed: ${error?.message}") | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment