How to implement Facebook Account Kit in Ionic 4

302 Views Asked by At

I'm getting error Cannot read property 'loginWithPhoneNumber' of undefined

I've made developer account and setup App. I'm trying to implement this on android and have installed cordova-plugin-accountkit.

I tried this code on click:

(<any>window).AccountKitPlugin.loginWithPhoneNumber({
    useAccessToken: true,
    defaultCountryCode: "US",
  },function(res){
    console.log(res)
  },function(err){
     console.log(err)
})
1

There are 1 best solutions below

0
Rahul On

You have to remove fcm or firebase plugin from your app and then remove and add android platform again and build. It will work fine