MessengerExtensions.getSupportedFeatures()

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.

Contents

Method

MessengerExtensions.getSupportedFeatures(success, error)

Example

MessengerExtensions.getSupportedFeatures(function success(result) {
  let features = result.supported_features;
}, function error(err) {
  // error retrieving supported features
});

Parameters

Parameter Type Description

success

Function

Success callback function. Receives an array of features supported in the current webview.

error

Function

Error callback function. Called if Messenger was unable to retrieve supported features.

Returns

An object with the supported features is returned to the success callback.

{
  "supported_features":[
    "payments",
    "context",
    "sharing_broadcast",
    "sharing_direct",
    "sharing_open_graph"
  ]
}

Properties

Property Type Description

supported_features

Array<String>

A list of features supported in the current webview. For details, see Features

Features

The following values may be returned in the supported_features array:

Feature Description

payments

Whether payments is supported on this client.

sharing_broadcast

Using beginShareFlow() to open a broadcast flow will work on this client.

sharing_direct

Using beginShareFlow() to share to the current thread will work on this client.

sharing_open_graph

Sharing open graph messages is available.

context

getContext() is available in the webview.