简体   繁体   中英

CardAction button with type=invoke doesn't work in microsoft bot framework

According to this document [ https://msdn.microsoft.com/en-us/microsoft-teams/botsmessages#action---invoke-new] we can use invoke in Hero card button but it giving me below error "ActionTypes does not contain a definition for invoke

Um using Microsoft.Bot.Builder 3.2.1

Can someone help me

My code in this Link

The Invoke action exists, but it is reserved for internal use.

Your bot may receive an invoke activity that represents a request for it to perform a specific operation. The sender of an invoke activity typically expects the bot to acknowledge receipt via HTTP response. This activity type is reserved for internal use by the Microsoft Bot Framework.

Update BotBuilder. While I'm not sure the exact release, I believe you'll want 3.5.x.

Invoke does work as documented - it sends a payload of your choice back to the bot (like postBack ), but does not display anything in the chat window like imBack or postBack would do.

Note that the Activity your bot receives is of type: invoke , not message , per the documentation.

I don't think the "invoke" actions type was ever implemented. Can't find any record of it on the botbuilder github repository. Not for version 3.2.1 or newer version.

You can check it out yourself here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM