[Facebook Instant Games] How to know when FBInstant.initializeAsync() has resolved?

Hi!
For Facebook Instant Games SDK, since Cocos Creator automatically initializes “initializeAsync” and “startGameAsync” when the game is loaded, how can we know that FBInstant.initializeAsync() has resolved to start calling other Instant Games SDK functions?
For example, how can I replicate what happens in the official initializeAsync() example, shown below. (source: https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.2)

FBInstant.initializeAsync().then(function() {
  // Many properties will be null until the initialization completes.
  // This is a good place to fetch them:
  var locale = FBInstant.getLocale(); // 'en_US'
  var platform = FBInstant.getPlatform(); // 'IOS'
  var sdkVersion = FBInstant.getSDKVersion(); // '3.0'
  var playerID = FBInstant.player.getID();
});

Hi. You have a callback function after initializeAsync() .then(function(){}). You start calling another functions inside of it.

Better to write something like .then(function(){},function(err){}). The second callback function will be called if an error appears during the init.