Sly Posted May 17, 2018 Share Posted May 17, 2018 can I get fb id before startGameAsync() function ? Quote Link to comment Share on other sites More sharing options...
enpu Posted May 17, 2018 Share Posted May 17, 2018 @Sly What exactly do you mean by fb id? Do you mean FBInstant.player.getID() ? Quote Link to comment Share on other sites More sharing options...
Sly Posted May 17, 2018 Author Share Posted May 17, 2018 yes Quote Link to comment Share on other sites More sharing options...
enpu Posted May 17, 2018 Share Posted May 17, 2018 You can call FBInstant.player.getID after initializeAsync has resolved. Since Panda's Instant Games plugin handles this, there is special function game.onFBInstantInitedthat is called as soon as the initializeAsync resolves: game.onFBInstantInited = function() { var playerID = FBInstant.player.getID(); }; Note that at this point the game might still be loading. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.