Facebook instant game stuck at 100%

391 Views Asked by At

So I created a simple game form HTML just for fun and I want to upload it to instant game facebook. I watch youtube but it was no use. I copied code from here and I don't know what to do now.

I read some documentation and did what it told like putting SDK link in index file Picture of Index file

SDK as they told

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

Picture of my simple main.js file which creates a random number and generates a quiz like game => My Javascript file

So when I try to upload the game it wasn't uploading and it kept asking for bundled so search it here and found this post, I did what the answer of the post said Facebook Instant Game - Uploading bundled zip file gives SDK reference error from Web Hosting

This is my main js

window.onload = function () {
    FBInstant.initializeAsync().then(function () {
        FBInstant.setLoadingProgress(100);
    });
    FBInstant.startGameAsync().then(function () {
        startGame();
    })
};
 function okboomer() {
var name = document.getElementById("name").value;
var guy = ["Photoguy", "badass army guy", "confuse guy", "bush guy", "cricket guy", "tea lover", "guy with elite pass", "melee weapons guy", "guy who stole lran weapons", "chad"];
let getran = function(start, range) {
    let getrand = Math.floor((Math.random() * range) + start);
    while (getrand > range) {
        getrand = Math.floor((Math.random() * range) + start);
    }
    return getrand;
}
console.log("ok boomer");
console.log(name);
console.log(getran(1, 10));
let numb = getran(1, 10);
document.getElementById("maintext").innerHTML = name + " " + "you will be that " + " " + guy[(numb - 1)];
document.getElementById("main").innerHTML = "<img src=" + "photo/" + numb + ".jpg>";

}

My fbapp-config.json

{
"instant_games": {
  "platform_version": "RICH_GAMEPLAY",
  "orientation": "PORTRAIT",
  "navigation_menu_version": "NAV_FLOATING"
}

}

I don't know what is wrong I did everything facebook quick start told like installing node.js and install certification.

I upload the game to publish it and shared in my timeline but when I run it, it always gets stuck at 100% The Game Link => https://fb.gg/play/151566992844113 Please help me, I really want to know how to upload game into Facebook.

0

There are 0 best solutions below