Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to open webview inside facebook messenger on desktop web browser

I'm trying to implement some features inside a web view in facebook messenger. on the phone the webview is opening fine, but in desctop web browser the webview is opening inside a new tab. im using the following feature: buttons:[{ type: "web_url", url: "https://www.oculus.com/en-us/rift/", title: "Open Web URL", webview_height_ratio: "compact", messenger_extensions: true, } I know that maybe it is supposed to open like this but you all can agree that if I'm implementing a custom feature inside the conversation it would be mach better to open it inside a small webview in the conversation. does anyone knows if this even possible?

like image 987
user1798940 Avatar asked Feb 16 '17 23:02

user1798940


1 Answers

You have to follow the steps in these docs.

Make sure to read the docs for desktop and add the X-Frame-Options header. The troubleshooting section in the same docs is your friend.

Two caveats:

  • X-Frame-Options header does not seem to be enough for firefox. I'm in the process of building a bot using webview, and when I figure out which headers to send to make firefox work, I will post them here. EDIT due to some bugs within the platform on the web, I've postponed this project.
  • There seem to be a problem with getting page-scoped user ids on desktop. Read my question.
like image 143
Anton Avatar answered Oct 14 '22 19:10

Anton