Jump to content

Facebook's FB.login on Phaser.Button: doesn't work on mobile Safari (iOS 9)


Recommended Posts

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();
  }, {scope: 'public_profile, email', return_scopes: true});
}, this);

The game is online right now ( 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


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...