Alessandro
Alessandro

Reputation: 175

Facebook Messenger Postback

I have a very interesting and annoying issue. I build a Facebook messenger bot ... everything worked fine. I have a webhook connected to my NodeJS server. Again everything is fie till I got to the "final touch" of the project, the Persistent Menu.

I added a Persistent Menu with the following command

  curl -X POST -H "Content-Type: application/json" -d '{
  "setting_type" : "call_to_actions",
  "thread_state" : "existing_thread",
  "call_to_actions":[
    {
      "type":"postback",
      "title":"Estimate an app cost",
      "payload":"startEstimation"
    },
    {
      "type":"postback",
      "title":"Get in touch",
      "payload":"getInTouch"
    },
    {
      "type":"web_url",
      "title":"View Website",
      "url":"http://whatever.com"
    }
  ]
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=BLA"

Again here everything worked fine I even got the {"result":"Successfully added structured menu CTAs"} answer and now I HAVE MY MENU. The only problem is that when I click one of the postback buttons .. nothing happens.

Facts:

What on Earth could I miss ?

Upvotes: 1

Views: 1971

Answers (1)

hya
hya

Reputation: 1738

Checkout new Persistent menu requirements.

https://developers.facebook.com/docs/messenger-platform/messenger-profile/persistent-menu

It has changed a little bit (especially POST request), so probably that's the problem.

Upvotes: 2

Related Questions