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?
how to open webview inside facebook messenger on desktop web browser
Asked Answered
I'm very much interested in the same. Did you ever find an answer? –
Crossbar
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.
You have to both things set: the headers AND the messenger_extensions set to true for this to work. –
Robber
© 2022 - 2024 — McMap. All rights reserved.