@mediahack wrote:
I recently updated to Beta19 and button (click) isn't being consistent for me. iOS simulator isn't outputting console.log calls and my FB provider methods are not being fired. This was working before the update. Any suggestions?
Cordova CLI: 6.0.0
Gulp version: CLI version 0.3.0
Gulp local: Local version 3.9.1
Ionic Version: 2.0.0-beta.2
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
ios-deploy version: Not installed
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v5.3.0
Xcode version: Xcode 7.2.1 Build version 7C1002
I fixed the console log. Was an error on my part. However, my Fb Provider isn't working still.
import {Page, NavController, NavParams, Platform} from 'ionic-angular';
import {FbProvider} from '../../providers/fb-provider/fb-provider';@Page({
templateUrl: 'build/pages/login/login.html',
providers: [FbProvider]
})
export class LoginPage {// provide Angular with metadata about things it should inject in the constructor static get parameters() { return [[NavController], [NavParams], [Platform], [FbProvider]]; } constructor(nav, navParams, platform, fbProvider) { this.nav = nav; this.platform = platform; this.fb = fbProvider; } facebookLogin() { console.log('you clicked facebook login'); this.fb.getLoginStatus().then((status) => {}
}
}import {Platform} from 'ionic-angular';
export class FbProvider {// provide Angular with metadata about things it should inject in the constructor static get parameters() { return [[Platform]]; } constructor(platform) { this.platform = platform; } getLoginStatus() { let p = new Promise((resolve, reject) => { facebookConnectPlugin.getLoginStatus( (status) => { resolve(status); }, (err) => { reject(err); } ); }); return p; }
}
Posts: 3
Participants: 1