-
AuthorPosts
-
June 8, 2018 at 7:30 am #12423
Peter O.ParticipantHello,
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.
June 8, 2018 at 7:33 am #12425
AlexKeymasterPlease 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]
June 8, 2018 at 7:36 am #12426
Peter O.ParticipantHi Alex,
Ok. Thank you. Will try what you are suggesting.
P.
June 9, 2018 at 4:23 pm #12480
AlexKeymasterFor 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 .
-
AuthorPosts
- You must be logged in to reply to this topic.