MessengerExtensions.requestCloseBrowser()

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

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

ความพร้อมใช้งาน

API ใช้งานได้เฉพาะใน Messenger เวอร์ชัน 113 ขึ้นไปบน Android และเวอร์ชัน 114 ขึ้นไปบน iOS

หากต้องการตรวจสอบความพร้อมใช้งานในแต่ละไคลเอ็นต์ ลองเรียก getSupportedFeatures() แล้วตรวจหาทรัพย์สิน “context” ในข้อความตอบกลับ

The requestCloseBrowser() method allows you to programmatically close the webview and return the user to the conversation in Messenger.

Contents

Method

MessengerExtensions.requestCloseBrowser(success, error)

Example

MessengerExtensions.requestCloseBrowser(function success() {
  // webview closed
}, function error(err) {
  // an error occurred
});

Parameters

Parameter Type Description

success

Function

Success callback function.

error

Function

Error callback function.