西浦直志
西浦直志

Reputation: 31

Slack button not send response when using bot frame work

When the bot sends a post back reply to the slack by button click event. The slack did not reply, Some documentation say slack accept post back event Microsoft bot builder cards imback method doesnt display text on Slack but I cant find how. I’m using bot frame work connector not adaptor.

public static HeroCard GetHeroCard(List<string> answerlist)
    {
        List<CardAction> cardButtons = new List<CardAction>();
        for (int i = 0; i <= answerlist.Count-1; i++) 
        {
            var reply = i + 1;
            //CardAction plButton = new CardAction(ActionTypes.ImBack)
            CardAction plButton = new CardAction()
            {
                Value = reply.ToString(),
                Type = ActionTypes.PostBack,
                Title = answerlist[i]
            };
            cardButtons.Add(plButton);
        }
        var heroCard = new HeroCard
        {
            Title = "",
            Subtitle = "",
            Text = "",
            Buttons = cardButtons,
        };
        return heroCard;
    }

[![buttons image][1]][1]

Upvotes: 0

Views: 222

Answers (1)

西浦直志
西浦直志

Reputation: 31

I checked MS Documents and found I missed one setting.

Add and Configure Interactive Messages (optional). It solved the problem perfectly.

Upvotes: 1

Related Questions