Webview on Facebook Messenger returns user id after button template but not after permanent menu button

When I generate this template, I get the user id in the webview:

{
  "message" : {
      "attachment" : {
          "type" : "template", 
          "payload" : {
              "template_type" : "button", 
              "text" : "webview test", 
              "buttons" : [
                  {
                      "type" : "web_url", 
                      "url" : "...", 
                      "title" : "open", 
                      "webview_height_ratio" : "full", 
                      "messenger_extensions" : true
                  }
              ]
          }
      }
  }
}
      

Run codeHide result


But when I try to access the same webview through the persistent menu, I get the error: This SDK method is not supported by this Messenger client. Refresh the page.

I posted this on Facebook Api to set the menu:

{
  "persistent_menu":[
    {
      "locale":"default",
      "composer_input_disabled":false,
      "call_to_actions":[
	        {
	          "type":"web_url",
	          "title":"Instellingen",
	          "url":"###URL###",
	          "webview_height_ratio":"full",
	          "messenger_extensions": true
	        }
    	]
    }
  ]
}
      

Run codeHide result


The menu is displayed correctly in the Messenger app (mobile). I also have the latest version of the Messenger app installed.

Does anyone know how to fix this?

+3


source to share





All Articles