aidonsnous
aidonsnous

Reputation: 1503

Botkit is not sending Generic Template (Attachments) facebook messenger

I am trying to reply to the user with this message:

  bot.reply(message, {
                    "attachment":
                    {
                        "type": "template",
                        "payload": {
                            "template_type": "generic",
                            "sharable": true,
                            "elements": [
                                {
                                    "title": "MY title of bd",
                                    "image_url": "https://storage.googleapis.com/ssfkj.com/undefined",
                                    "subtitle": "undefined/undefinedundefinedn(undefined)",
                                    "default_action": { "type": "web_url", "url": "https://ssfkj.com/profile", "messenger_extensions": true, "webview_height_ratio": "tall", "fallback_url": "https://ssfkj.com/profile" }
                                    , "buttons": [{ "type": "payload", "payload": "DEL__PA_undefined", "title": "View more" }
                                    ]
                                }]
                        }
                    }
                });

But the bot is sending nothing. What is wrong in my code?

Upvotes: 0

Views: 319

Answers (1)

aidonsnous
aidonsnous

Reputation: 1503

My problem was on this level :

"buttons": [{ "type": "payload", "payload": "DEL__PA_undefined", "title": "View more" }]

The

type property

should have the value

postback

not

payload

Upvotes: 2

Related Questions