0

The instant game only starts when the startasync function is called...and all the fbinstant function only works within the startAsync function...So how to call shareAsync when user clicks a button

1 Answers1

0

Within the initialization of the page, the init call or event after the start call are great times to add an event listener.

As long as the FBInstant method is called after startGameAsync resolves, the share method will work.

Please note that the Instant Games SDK a only works within the Instant Games container. You cannot use the SDK on a different website. If you’re trying to do that, use the regular Facebook JavaScript SDK.

Community
  • 1
  • 1
Chris Hawkins
  • 764
  • 4
  • 15