Are Facebook Messenger pop-up webviews supported on desktop browsers?

帅比萌擦擦* 提交于 2019-12-10 23:30:37

问题


I am able to use Messenger webviews on the IOS Messenger app (configured as described in the documentation), but in the desktop browser the webViews always open in a new page.

Am I doing something wrong, or does Messenger in desktop web browsers simply not support the webview display modes like "compact" or "tall"?


回答1:


As of today, it is now doable. To make a pop-up webview instead of opening a new tab, you will need to:

1) Set up proper X-Frame-Options HTTP response header to allow your pages within an iframe.

2) If the webview is to be opened from the persistent menu, you will need to set the value of the property "messenger_extensions" of the "menu_item" object to true.

Links:

https://developers.facebook.com/docs/messenger-platform/webview/extensions https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/persistent-menu



来源:https://stackoverflow.com/questions/44397701/are-facebook-messenger-pop-up-webviews-supported-on-desktop-browsers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!