MessengerExtensions.getContext()

Messenger Extensions SDK

This method is a part of the Messenger Extensions SDK. For information on including the SDK in your site, see Add Messenger Extensions SDK.

Availability

This API is available only in Messenger on v113+ on Android and v114+ on iOS.

To check for its availability on a given client, call getSupportedFeatures() and check for the context property in the response.

The requestCloseBrowser() method allows you to programmatically close the webview and return the user to the conversation in Messenger.

Contents

Method

MessengerExtensions.requestCloseBrowser(success, error)

Example

MessengerExtensions.requestCloseBrowser(function success() {
  // webview closed
}, function error(err) {
  // an error occurred
});

Parameters

Parameter Type Description

success

Function

Success callback function.

error

Function

Error callback function.