MessengerExtensions.getSupportedFeatures()

SDK ส่วนขยายของ Messenger

วิธีการนี้เป็นส่วนหนึ่งของ SDK ส่วนขยายของ Messenger สำหรับข้อมูลเกี่ยวกับการรวม SDK ไว้ในไซต์ของเรา โปรดดู “เพิ่ม SDK ส่วนขยายของ 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:

คุณสมบัติคำอธิบาย

payments

ว่ารองรับการชำระเงินในไคลเอ็นต์หรือไม่

sharing_broadcast

การใช้beginShareFlow()เพื่อเปิดโฟลว์การแพร่ภาพจะใช้การบนไคลเอ็นต์นี้ได้

sharing_direct

การใช้beginShareFlow()เพื่อแชร์เธรดปัจจุบันจะใช้การบนไคลเอ็นต์นี้ได้

sharing_open_graph

สามารถแชร์ข้อมูลกราฟเปิดได้

context

getContext() มีให้บริการในมุมมองเว็บ