Cordova plugin facebook4, how to use it?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Cordova plugin facebook4, how to use it?



I am integrating the Facebook login to my hybrid app and for this I have used cordova-plugin-facebook4.



run in cmd


$cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="myID" --variable APP_NAME="myApplication"



run cordova browser


$cordova run browser



error



window.FB.init(...) is not a function



console



enter image description here



Code


login () {
window.facebookConnectPlugin.login(['email, profile_public'],
this.onSignInSuccess, this.onSignInError)
}

created () {
window.fbAsyncInit = function () {
window.FB.init({
appId: '1854483668193025',
cookie: true,
xfbml: true,
version: 'v3.0'
})(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0]
if (d.getElementById(id)) return
js = d.createElement(s); js.id = id
js.src = 'https://connect.facebook.net/en_US/sdk.js'
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'))
}
}



What is wrong?



This question has not received enough attention.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived