skip to Main Content

Facebook recently added webview support to the Messenger Bot API. However, as per the documentation, it’s only supported on iOS and Android devices.

If I try to click a webview button in desktop, it opens the URL (or the fallback URL, if defined) in a new window, thus breaking the user experience.

Is there any way to detect if the user’s client has webview support?
Example: if user is using iOS/Android, present a webview with a nice datepicker. If not, ask him to type the date in some format.

3

Answers


  1. As far as I know current facebook API doesn’t allow you you know to get that info (like user-agent) from the user.

    Login or Signup to reply.
  2. I am not sure but I think you can use below code to check the support for webview. It returns boolean value.

      var IsWVSupported = MessengerExtensions.isInExtension();
    
    Login or Signup to reply.
  3. I think this has all changed. The MessengerExtensions has a function getSupportedFeatures where you could check for whichever features you require. But in general I believe you can now use MessengerExtensionsSDK features in desktop. It shows the app that would be webviewed on mobile in an iFrame on desktop.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search