MessengerExtensions.requestCloseBrowser()

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
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.

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.