Skip to content Skip to sidebar Skip to footer

What Is The Reason Behind "unresolved Reference" When Using Kotlin For Facebooklogin?

I keep getting a 'unresolved reference: FacebookCallback' error when I am trying to implement the code attached in the picture. I am trying to set up facebook login as instructed

Solution 1:

A proper way to anonymously implement FacebookCallback in Kotlin is as follows:

val facebookCallback = object : FacebookCallback<LoginResult> {
    overridefunonSuccess(loginResult: LoginResult) {
    }

    overridefunonCancel() {
    }

    overridefunonError(error: FacebookException) {
    }
}

Object Expressions and Declarations documentation provides all necesary details.

Post a Comment for "What Is The Reason Behind "unresolved Reference" When Using Kotlin For Facebooklogin?"