botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[MS Teams] PostBack not working in Microsoft Teams

Open Malith1994124 opened this issue 9 years ago • 15 comments

In Microsoft Teams button postback is not working. So can i know when this available for Microsoft Teams

Malith1994124 avatar Apr 23 '17 19:04 Malith1994124

@Malith1994124 are you using C# or Node SDK?

nwhitmont avatar Apr 24 '17 16:04 nwhitmont

Postback is not supported in Teams. We do support imBack and invoke currently.

RichMoeMSFT avatar Apr 24 '17 22:04 RichMoeMSFT

@nwhitmont um using c#

Malith1994124 avatar Apr 25 '17 01:04 Malith1994124

Microsoft say there are working about this problem in Jan . I want to know when this ia going to avialable.

Malith1994124 avatar Apr 25 '17 05:04 Malith1994124

What is it you're trying to accomplish? Invoke allows you to send a hidden payload like postBack, just doesn't echo anything back to the user. Here's the help section.

RichMoeMSFT avatar Apr 25 '17 13:04 RichMoeMSFT

capturew

@RichMoeMSFT Itz give me an error in Visual studio. Error is ActionTypes does not contain a definition for invoke

Malith1994124 avatar Apr 26 '17 00:04 Malith1994124

@RichMoeMSFT Invoke is not in microsoft bot builder (https://github.com/Microsoft/BotBuilder/blob/botbuilder%403.2.1/CSharp/Library/Microsoft.Bot.Connector/ActionTypes.cs)

Malith1994124 avatar Apr 27 '17 08:04 Malith1994124

I see the confusion: invoke is not an ActionType, it is an ActivityType - it's not an action in a message, it's a completely different activity altogether. You can set the Type = "invoke" in your constructor (or ActionTypes.Invoke), and you'll need to check for ActivityType=invoke in your incoming message parsing (not message.)

I'll clarify in the documentation.

RichMoeMSFT avatar Apr 30 '17 00:04 RichMoeMSFT

@Malith1994124 Here is the invoke documentation.

RichMoeMSFT avatar May 17 '17 21:05 RichMoeMSFT

@Malith1994124 I am going to close this issue because it seems @RichMoeMSFT has resolved the underlying problem for you. If this is not correct please continue the conversation here and reopen if needed.

JasonSowers avatar May 24 '17 20:05 JasonSowers

@RichMoeMSFT In the link you provided there is no mention of invoke. Can you please provide correct documentation? I am using node.js

jakubbares avatar Jan 25 '18 11:01 jakubbares

@jakubbares check out this link https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bots-cards

JasonSowers avatar Jan 25 '18 20:01 JasonSowers

Thanks but that did not help. I looked into the code of the library botbuilder to see directly how it is supposed to work. Invoke is no longer part of that library I found. So only option is messageBack which I know how to call but dont know how to catch it when called

jakubbares avatar Jan 26 '18 11:01 jakubbares

I have answered your stack overflow question here https://stackoverflow.com/questions/48442248/how-to-catch-messageback-in-node-js

JasonSowers avatar Jan 26 '18 17:01 JasonSowers

@JasonSowers any news or ETA about support 'postBack' by MS Teams? thanks.

ma3yta avatar Jul 02 '18 14:07 ma3yta