Instant Games

Instant Games SDK v8.0: FBInstant.room

Updated: May 5, 2026
Copy for LLM
See Instant Games SDK v8.0 for the SDK overview, changelog, and root FBInstant reference.

FBInstant.room

Contains functions and properties related to the messenger rooms environment.

getCurrentMatchAsync()

Retrieves the current real-time match for the gameplay environment, if one exists.
Returns:Promise<LiveMatch> — A promise that resolves with the current live match being played in this session
Throws:
  • INVALID_OPERATION
  • INVALID_PARAM
  • LIVE_MATCH_NOT_FOUND
Example:
FBInstant.room.getCurrentMatchAsync()
  .then(function(match) {
    ...
  });

LiveMatch

An instant game live match that is played in a Messenger Rooms call simultaneously by all the participants.

getID()

The unique live match ID.
Returns:string — The live match ID
Example:
FBInstant.room.getCurrentMatchAsync()
  .then(function(match) {
    console.log(match.getID());
  });

getContextID()

The unique context ID that is associated with this live match.
Returns:string — The context ID for this live match
Example:
FBInstant.room.getCurrentMatchAsync()
  .then(function(match) {
    console.log(match.getContextID());
  });

Types

LiveMatchArgs

Arguments for creating a LiveMatch instance.
Properties:
PropertyTypeDescription
liveMatchID
string
The unique identifier for the live match
contextID
string
The context ID associated with this live match