MessengerExtensions.getSupportedFeatures()

MessengerエクステンションSDK

このメソッドは、MessengerエクステンションSDKの一部です。サイトにSDKを実装する方法については、こちらのMessengerエクステンション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:

機能説明

payments

このクライアントで、決済がサポートされているかどうか。

sharing_broadcast

このクライアントで、beginShareFlow()を使用してライブ配信フローを開始する機能を利用できるかどうか。

sharing_direct

このクライアントで、beginShareFlow()を使用して現在のスレッドをシェアする機能を利用できるかどうか。

sharing_open_graph

Open Graphメッセージのシェア機能を利用できるかどうか。

context

getContext()をウェブビューで利用できるかどうか。