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?
Asked
Active
Viewed 4,532 times
14

user1798940
- 153
- 2
- 8
-
I'm very much interested in the same. Did you ever find an answer? – Anton Aug 20 '17 at 18:35
1 Answers
5
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.

Anton
- 2,282
- 26
- 43
-
You have to both things set: the headers AND the messenger_extensions set to true for this to work. – ortonomy Apr 26 '19 at 11:54