MessengerExtensions.getSupportedFeatures()

SDK per le estensioni di Messenger

Questo metodo rientra nell'SDK per le estensioni di Messenger. Per informazioni su come includere l'SDK sul tuo sito, consulta Aggiunta dell'SDK per le estensioni di Messenger.

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:

FunzioniDescrizione

payments

Indica se i pagamenti sono supportati sul client.

sharing_broadcast

L'uso di beginShareFlow() per aprire un flusso di trasmissione è possibile sul client.

sharing_direct

L'uso di beginShareFlow() per condividere la conversazione corrente è possibile sul client.

sharing_open_graph

La condivisione di messaggi Open Graph è disponibile.

context

getContext() è disponibile nella visualizzazione web.