MessengerExtensions.getSupportedFeatures()
此方法屬於 Messenger 擴充功能 SDK 的一部分。若要瞭解如何將 SDK 加到您的網站,請參閱加入 Messenger 擴充套件 SDK一文。
MessengerExtensions.getSupportedFeatures(success, error)
MessengerExtensions.getSupportedFeatures(function success(result) {
let features = result.supported_features;
}, function error(err) {
// error retrieving supported features
});
Parameter | Type | Description |
---|---|---|
| Function | Success callback function. Receives an array of features supported in the current webview. |
| Function | Error callback function. Called if Messenger was unable to retrieve supported features. |
An object with the supported features is returned to the success callback.
{
"supported_features":[
"payments",
"context",
"sharing_broadcast",
"sharing_direct",
"sharing_open_graph"
]
}
Property | Type | Description |
---|---|---|
| Array<String> | A list of features supported in the current webview. For details, see Features |
The following values may be returned in the supported_features
array:
功能 | 說明 |
---|---|
| 這個用戶端是否支援付款。 |
| 在這個用戶端上可使用 |
| 在這個用戶端上可使用 |
| 可分享開放社交關係圖訊息。 |
| 可在 WebView 使用 |