Play game button - fb instant games

0 favourites
  • 2 posts
From the Asset Store
A set of board games to make your day joyful. Play, Enjoy, Relax
  • Hello, I'm developing a game for the facebook instant games platform and I need to add a preloader in the

    using the API.

    I did everything correctly, but I'm having trouble adding

    the blue "play now" button (Image: to make the game start only after

    the user clicks this video button: https: //

    Anyone who knows the facebook api could tell me the correct way to add this button?


    <!DOCTYPE html>
    <html manifest="offline.appcache">
    <head><script src=""></script>
            <script src = "game.js"></script>
    </html> [/code:31mjocj0]
    [code:31mjocj0]FBInstant.initializeAsync().then(function() {
        Module._fbinstant_inited = true;
        FBInstant.startGameAsync().then(function() {
            var windowWidth = window.innerWidth;
            var windowHeight = window.innerHeight;
            if(windowWidth > windowHeight){
                windowWidth = windowHeight / 1.8;
            var gameWidth = windowWidth * gameOptions.gameHeight / windowHeight;
            game = new Phaser.Game(gameWidth, gameOptions.gameHeight, Phaser.CANVAS);
            game.state.add("Boot", boot);
            game.state.add("Preload", preload);
            game.state.add("TitleScreen", titleScreen);
            game.state.add("PlayGame", playGame);
     FBInstant.startGameAsync().then(function() {
      // Here we can be sure the player has already tapped play.
    }); [/code:31mjocj0]
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • that button automatically appears when you post the game on instantgames platform, and is detecting the facebook server (that button is part of the default instantgames C2 plugin when detects loading of the app), you should see a loading from 0 to 100 and a play now (however the play now button will just load things in a faster manner, is like 1 second difference). for me was automatically you don't need to do nothing else, but to correctly implement your instantgames developers dashboard app settings, from what i seen and experienced.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)