Facebook游戏开发人员可以帮助我

时间:2020-05-22 19:40:12

标签: javascript json facebook facebook-javascript-sdk facebook-instant-games

我正在尝试在Facebook即时游戏中上传游戏。我将其上传到Facebook一切都很好,但是我的游戏加载间隔不起作用。它卡在0%,我不知道为什么。我没有发现任何代码错误。如果有专家能帮到我,那就太好了。 预先感谢。

FBInstant.initializeAsync()
  .then(function()
    //mygame assets
    var progress = 0;
    var interval = setInterval(function() {
      progress += 3;
      FBInstant.setLoadingProgress(progress);
      if (progress >= 95) {
        clearInterval(interval)
        FBInstant.startGameAsync()
          .then(function() {

            var playerName = FBInstant.player.getName();
            var playerId = FBInstant.player.getID();

            game.start();
          });
      }
    }, 100);
  );

0 个答案:

没有答案