Do we still need to add the facebook-instant game sdk in html file in phaser 3?

hello guys,
I started using facebook features in phaser 3 which gives us the direct interaction with FB-instant games SDK. As I use web pack to bundle my games and serve through the dist folder, I tried zipping my dist folder and to upload in my FB-instant app but it was showing that FB-instant SDK should be added in HTML file (index.html). do we really need to add FB-instant SDK in the index file? as phase 3 itself uses the FB-instant plugin. by the way, I use npm package of phaser 3.

Yes, you have to use FB instant sdk script into your index. just use like this -

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

i tried using that but after uploading the bundle in my fb app. it is showing error after scanning. don’t know what’s wrong with it.

Initialize FB Instant Game SDK before starting the game. You can use -

 <script type="text/javascript">
  FBInstant.initializeAsync().then(function() {
    console.log("FB instant initializeAsync");
  });
</script>

thanks for you are time to give reply, I have added that too but it wasn’t the issue with it, issue is actually the code that i have bundled using web pack.

One more thing,if you missed, Add a fbapp-config.json file. Without this, some error can occur. Use the official template if you think there is a problem in your webpack.

yes i do add that config file to my bundle. do you use web pack?

Yes, I do.