Facebook Instant Games & Firebase, store & view pending challenges


Photo by Nhu Nguyen on Unsplash

Pending requests/challenges is a great feature to have, especially for multiplayer games, however Facebook SDK doesn’t really give us many tools to go on, currently the only way to see any pending challenges is via the native Facebook menu when calling chooseAsync

And this is where this article comes into play. In order to achieve this we use a simple functionality that includes the context match-idand the opponentsuser-facebook-id

We will create two mechanics, one to receive Any challenges in any context from anyone, and one to receive pending challenges for the current context (this is especially useful for games that require subsequent actions to happen and actually the existence of this mechanic actually allows these games to be…

Read more · 4 min read


Tags

  • facebook instant games
  • Firebase
  • firestore
  • gaming
  • multiplayer

Mike Dobekidis

Senior software engineer with a passion for games (playing and creating). I love the creative part of coding and I try to write about things that are exciting!