I’m struggling to have a facebook login that opens in the facebook native app instead of the browser.
I’m aware of the fact that this kind of scenario could only be tested on a real device, and because of that I’m carrying out all of my testing on an iPhone 6 device running the latest iOS version.
I found out that the problem is located in the call
constructor(public navCtrl: NavController, public navParams: NavParams, public platform: Platform) {
Facebook.browserInit(this.FB_APP_ID, "v2.8");
}
at first I thought it was due to the fact that the system was trying to reference to a plugin that was not yet available, so I wrapped everything into a
this.platform.ready()
.then(() => {
console.log('view did load');
Facebook.browserInit(this.FB_APP_ID, "v2.8");
});
but it didn’t change a thing.
So I keep getting the same error which is
Uncaught (in promise): TypeError: undefined is not an object (evaluating 'pluginInstance[methodName].apply')
nevertheless if I comment the Facebook.browserInit call everything works (in the browser window).