title: How to create a Phaser button in Facebook instant games for a mobile device
body: <p>I am trying to create a button with Phaser 2 CE on a mobile device but it doesn't fires, even if it works fine on desktop, the entiere code will be on <a href="https://github.com/albator2018/phaser-facebook" rel="nofollow noreferrer">my github repository</a> but for the moment i can just display an image like in the code bellow</p>
  
  <pre><code>var game = new Phaser.Game(640, 480, Phaser.AUTO, 'game', { preload: preload, create: create, update: update });
  
  function preload () {
  
    game.load.image('logo', 'assets/phaser2.png');
    game.load.image("upArrow", "assets/up.png");
  
  }
  
  function create () {
    // Initialize player
    //player = game.add.sprite(20, 20, 'logo');
    game.device.desktop || addMobileInputs();    
  }
  
  function addMobileInputs() {
    upButton = game.add.sprite(40, 40, "upArrow");
    upButton.inputEnabled = !0;
    upButton.events.onInputDown.add(myHandler, this);
  }
  
  function myHandler() {
    alert("up");
  }
  
  function update() {
  
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/wCtRS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wCtRS.jpg" alt="enter image description here"></a></p>