WordPress LMS for Web and mobile Forums WPLMS Student App How to fix TS error: "Property 'browserInit' does not exist on type 'Facebook'.

How to fix TS error: "Property 'browserInit' does not exist on type 'Facebook'.

Back to course
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #12423

    Peter O.
    Hello, I am setting up my Ionic 3 with your Student App by following your Course: "Getting started with WPLMS Mobile App" here: https://wplms.io/course/getting-started-with-wplms-mobile-app/ After doing the steps in "Installing Necessary Packages" here: https://wplms.io/course/getting-started-with-wplms-mobile-app/installing-app-packages/  I then run "ionic serve" on my Windows 10 development machine. and get one TypeScript error in my Chrome browser as follows: Image capture of Error: https://www.screencast.com/t/FzgkcJYOjV TypeScript Error Property 'browserInit' does not exist on type 'Facebook'. D:/-/DevMobi/wplms/qimoves/src/services/authentication.ts Line number: 64 if(!this.config.isLoggedIn){ this.fb.browserInit(this.config.settings.facebook.app_id, "v2.9"); } How do I fix this error please? Thank you.              


    Please try running these command in your ionic project folder :

    npm install @ionic-native/[email protected]

    ionic cordova plugin add [email protected] --variable APP_ID="123456789" --variable APP_NAME="myApplication"

    Make sure that you replace the app id and app name with your fb app id and name .

        If still does not work then follow :    

    Take backup of all ionic setup then

    rename the node_modules folder in your ionic project (where src folder is) to node_modules_BACKUP and also rename the package.json file to package_BACKUP.json .

    then download the package.json file from here : https://bit.ly/2I2F732

    Then place it in your ionic project .

    Then in terminal of cmd run :

    npm install

    Then run this command in your ionic project :

    ionic cordova platform rm android

    ionic cordova platform add [email protected]


    Peter O.
    Hi Alex, Ok. Thank you. Will try what you are suggesting. P.

    Peter O.
    This reply has been marked as private.

    For facebook issue please refer : https://ionicframework.com/docs/native/facebook/  You need to create an app on fb and then note down the fb app name and client id form it and replace them in command  .   1,2,3 : Please inspect element your app in chrome  check and in network tab if you the api hits are working or not . refer : https://developers.google.com/web/tools/chrome-devtools/network-performance/reference   Check the screenshot : http://prntscr.com/jszk1y   4 : You can simply ignore these warnings.these are for optimization of code .
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.