MessengerExtensions.getSupportedFeatures()

SDK Messenger Extensions

Cette méthode fait partie du SDK Messenger Extensions. Pour plus d’informations sur l’intégration du SDK dans votre site web, consultez Ajout du SDK Messenger Extensions.

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:

FonctionnalitéDescription

payments

Si les paiements sont pris en charge pour ce client.

sharing_broadcast

L’utilisation de beginShareFlow() pour ouvrir un flux de diffusion fonctionne sur ce client.

sharing_direct

L’utilisation de beginShareFlow() pour partager la discussion actuelle fonctionne sur ce client.

sharing_open_graph

Partage de messages Open Graph disponible.

context

getContext() est disponible dans la webview.