gvescu Posted April 9, 2016 Share Posted April 9, 2016 I have tested already on Safari on Mac, Chrome on both desktop and mobile and various Android default browsers, and FB.login works fine (on desktop it's the modal and on mobile it's a new browser window/tab). However, it's not working on any iOS 9 device I've tested. My code looks like this (TypeScript, "this" in the code it's a Phaser.State object): var playbtn = this.game.add.button(0, 0, 'play-btn'); playbtn.inputEnabled = true; playbtn.onInputDown.add(() => { console.log("INPUT! Calling Facebook login..."); FB.login(() => { var response = FB.getAuthResponse(); console.log(response); /* REST OF LOGIN CODE */ }, {scope: 'public_profile, email', return_scopes: true}); }, this); The game is online right now (http://104.236.216.7) for testing. It's a mini game I'm making for a local store Has anybody called FB.login from inside Phaser? What do I have to do for it to work? Link to comment Share on other sites More sharing options...
rich Posted April 9, 2016 Share Posted April 9, 2016 My guess would be the call has to come from a DOM button, i.e. a real DOM touch event. Link to comment Share on other sites More sharing options...
bubamara Posted April 9, 2016 Share Posted April 9, 2016 use onInputUp instead gvescu 1 Link to comment Share on other sites More sharing options...
gvescu Posted April 10, 2016 Author Share Posted April 10, 2016 On 9/4/2016 at 9:21 AM, bubamara said: use onInputUp instead Wow, that did the trick... Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts