MessengerExtensions.getSupportedFeatures()

SDK Ekstensi Messenger

Metode ini adalah bagian dari SDK Ekstensi Messenger. Untuk informasi mengenai penyertaan SDK di situs Anda, buka Tambahkan SDK Ekstensi Messenger.

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:

FiturKeterangan

payments

Baik pembayaran didukung pada klien saat ini.

sharing_broadcast

Menggunakan beginShareFlow() untuk membuka alur siaran akan berfungsi pada klien ini.

sharing_direct

MenggunakanbeginShareFlow() untuk membagikan utas saat ini akan berfungsi pada klien ini.

sharing_open_graph

Berbagi pesan graf terbuka tersedia.

context

getContext() tersedia di tampilan web.