Jay A. Little
Jay A. Little

Reputation: 3287

Facebook Messenger button error: "Action Unsuccessful There was an error delivering your message..."

I've checked the other questions about this error and the only solutions offered are "subscribe to the messaging_postbacks at Messenger -> Settings -> Webhooks -> Edit events.

You can see here that I have done this since the original setup of my bot, and I have even re-subscribed to it since: enter image description here

But I am still getting this error:

enter image description here

I am logging any request that comes into my webhook and there is no activity, even though clicking the button, shows the payload value in blue as if I typed and sent it as a message. Then the popup "Action Unsuccessful" shows, and my bot doesn't receive anything.

Here is the response to FB with the button attachment elements:

{
    "recipient": {
        "id": "xxxxxxxxxxx"
    },
    "message": {
        "attachment": {
            "type": "template",
            "payload": {
                "template_type": "list",
                "top_element_style": "compact",
                "elements": [{
                    "title": "transfer",
                    "subtitle": null,
                    "image_url": "http://xxxxxxx",
                    "buttons": [{
                        "type": "postback",
                        "title": "transfer",
                        "payload": "transfer"
                    }]
                }, {
                    "title": "hourly",
                    "subtitle": null,
                    "image_url": "http://xxxxxxxx",
                    "buttons": [{
                        "type": "postback",
                        "title": "hourly",
                        "payload": "hourly"
                    }]
                }]
            }
        }
    }
}

Upvotes: 0

Views: 572

Answers (1)

Jay A. Little
Jay A. Little

Reputation: 3287

The Page Access Token just needed to be updated in the webhook. Probably to apply the latest permissions that include messaging_postbacks.


Go back to developer app dashboard. Select Messenger >> Settings. Scroll down to the "Token Generation" section: enter image description here

Select your page from the dropdown, and copy the new access token for use in your webhook.

Found a lot of similar questions and no clear answers. So I hope this saves someone the days of headache it caused me.

Upvotes: 0

Related Questions