gvescu

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();
    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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.