简体   繁体   中英

how to get back the “payload” of the button “ Get Started ” in c#

I work with Microsoft Bot Framework in Messenger and I would like to know how to get back the "payload" of the "Get Started" button. Which function I should create in C#?

You don't have to - the payload is returned as a regular message, so you can just use this:

if (activity.ChannelId == "facebook" && activity.Text == "GET_STARTED_PAYLOAD")
{
   // etc

Note that the documentation lists some restrictions on this feature :

  • The welcome screen is only shown the first time the user interacts with the Page on Messenger.
  • Only admins, developers, and testers of the app can see it when the app is in development mode.
  • Your app must be subscribed to postback webook events.

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