0

Is it possibile to test a Facebook Instant Game without uploading the bundle on FB servers?

I'm using this code:

<body>
    <script src="https://connect.facebook.net/en_US/fbinstant.6.3.js"></script>

    <script>
    window.addEventListener('DOMContentLoaded', function() {

        FBInstant.initializeAsync().then(function() {

            console.log("FBInstant init ok!");

        });

    });
    </script>
</body>

The DOM is correctly loaded, but nothing is logged.

If I run initializeAsync() from console I get a 0/null variable:

> FBInstant.initializeAsync()
m {_state: 0, _value: null, _deferreds: Array(0)}
Iskra
  • 1
  • 3

1 Answers1

0

Yes, it's absolutely possible. First, make sure you follow this guidelines https://developers.facebook.com/docs/games/instant-games/test-publish-share/

In test mode, FB opens the game in an iframe.

Let me know if you still stuck somewhere.

Navdeep Singh
  • 181
  • 1
  • 7
  • 1
    I meant to test a FB Instant Game being on a local machine, without the need to access to FB servers. But I think it's not possible. FB Instant Games needs a FB context in order to work. Thank you! – Iskra May 12 '20 at 22:23
  • Yeah need valid FBInstant.context.getID(); after FBInstant.initializeAsync() called. – Navdeep Singh May 13 '20 at 08:01