Facebook Login With Cordova
-
Hello.
I’m having an issue with cordova-plugin-facebook4 plugin for cordova. I’ve tried everything to make it run on quasar, but without success. Somebody can tell me if in quasar exists a plugin or a method to make it work?
I’m tring just like that
But, when i start the application on my android, it tells me that login method cannot be read because the facebookConnectPlugin is undefined. But, how i define that?
(My facebook app is configured on developers page on facebook and the ID is configured as well as you can see bellow)
export function loadFbSdk (appId, version) {
return new Promise(resolve => {
window.fbAsyncInit = function () { // eslint-disable-line func-names
FB.init({
appId: ‘MY_APP_ID’,
xfbml: true,
version: ‘v2.8’,
cookie: true
})
FB.AppEvents.logPageView()
resolve(‘SDK Loaded!’)
};
(function (d, s, id) { // eslint-disable-line func-names
const fjs = d.getElementsByTagName(s)[0]
if (d.getElementById(id)) { return }
const js = d.createElement(s)
js.id = id
js.src = ‘//connect.facebook.net/en_US/sdk.js’
fjs.parentNode.insertBefore(js, fjs)
}(document, ‘script’, ‘facebook-jssdk’))
})
} -