Phaser API Documentation

  Version: 
openShare(text, key, [frame], [sessionData])

Description:

This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.

A blob of data can be attached to the share which every game session launched from the share will be able to access via the this.entryPointData property.

This data must be less than or equal to 1000 characters when stringified.

When this method is called you should consider your game paused. Listen out for the resume event from this plugin to know when the dialog has been closed.

The user may choose to cancel the share action and close the dialog. The resulting resume event will be dispatched regardless if the user actually shared the content or not.

Parameters:

name type arguments description
text string

A text message to be shared.

key string

The key of the texture to use as the share image.

frame string <optional>

The frame of the texture to use as the share image. Set to null if you don't require a frame, but do need to set session data.

sessionData object <optional>

A blob of data to attach to the share.

Returns:
Description:

This Facebook Instant Games Plugin instance.

Since: 3.13.0