Facebook Messenger bot app - permanent menu not showing

I am creating a Facebook chat app. I've set up a persistent menu with some JSON using HTTP POST and a valid page access token.

To check if the installation is correct, I make a GET request to https://graph.facebook.com/v2.6/me/messenger_profile?fields=persistent_menu&access_token=TOKEN

using a valid token.

I get the answer:

{u'data': [{u'persistent_menu': [{u'composer_input_disabled': False,
 u'locale': u'en_US'},
{u'call_to_actions': [{u'call_to_actions': [{u'payload': u'whatever',
     u'title': u'action1',
     u'type': u'postback'},
    {u'payload': u'whatever 2',
     u'title': u'action2',
     u'type': u'postback'}],
   u'title': u'my title',
   u'type': u'nested'},
  {u'title': u'my title URL',
   u'type': u'web_url',
   u'url': u'http://google.com/',
   u'webview_height_ratio': u'full'}],
 u'composer_input_disabled': False,
 u'locale': u'default'}]}]}

      

This is what I put in, so everything is fine so far.

But when I open the Messenger app in iOS or find it messenger.com

on my Mac OS X desktop, I don't see any menu!

Enter image description here

Curiously, on my server webhook endpoint, I also get a Get Started button that returns a postback. So it works.

My webhook have the permission: messages, messaging_postbacks, messaging_optins, message_deliveries, message_reads

.

I tried:

  • Internet update
  • Killing an iOS app and restarting it
  • Delete conversations and restart the bot
  • Waiting 30 minutes and re-doing all of the above

And none of them worked. I can still see the download loader in my iOS Messenger app - perhaps the Facebook servers are just slowly updating my app? 30 minutes seems pretty extreme though.

Is there something wrong with my JSON for permanent menu customization? It seems like the only thing that could be wrong.

Any idea what I am doing wrong?

I checked back, more than 24 hours have passed and still no menu display.

+3


source to share


1 answer


Try it with Postman app and use POST with these parameters:

https://graph.facebook.com/v2.6/me/thread_settings?access_token=xxx

And fill the body with the following:



{
  "setting_type": "call_to_actions",
  "thread_state": "existing_thread",
  "call_to_actions": [
       {"type": "web_url",
      "title": "test",
      "url": "https://test.com"
       },
    {
      "type": "postback",
      "title": "Help",
      "payload": "help"
    },
    {
      "type": "postback",
      "title": "Website",
      "payload": "web"
    }
  ]
}

      

You can read more about the persistent menu in the documentation: https://developers.facebook.com/docs/messenger-platform/messenger-profile/persistent-menu

0


source







All Articles