I have a webview in my bot. I have the following JS code to close it:
complete: function (data) {
MessengerExtensions.requestCloseBrowser(function success() {
}, function error(err) {
window.close()
});
console.log("post success");
}
The webview is being closed on ANDROID and WEB But NOT on IOS.
Any help would be appreciated.
So apparently my problem was a mistake which led to a misunderstanding of the problem.
I didn't add messenger_extensions: true
and didn't whitelist my domain. Due to that the MessengerExtensions
call failed, and always got to the fallback which was window.close()
- which works on WEB and Android, but not on IOS - hence I thought that all works but IOS.
After adding messenger_extensions: true
and whitelisting the domain all worked out.