简体   繁体   English

从活动源中的通知创建到选项卡的深层链接

[英]Creating a Deep Link to Tab from Notification in Activity Feed

I am developing a MS Team app which has a Tab and a Notification only Bot.我正在开发一个 MS Team 应用程序,它有一个选项卡和一个仅通知机器人。

How can i add a deep link to my tab when the user clicks on the Notification from the Activity Feed.当用户单击活动源中的通知时,如何向我的选项卡添加深层链接。

Sending the notification like below.发送如下通知。

const activity = {
                attachments: [card],
                text: 'Notification Text',
                summary: 'Notification Summary',
                channelData: {
                    notification: {
                        alert: true
                    }
                }
            };
            await turnContext.sendActivity(activity);

The slighly tricky part is figuring out the syntax for the deeplink, it's a little confusing the first time you do it, but have a look at the docs for Create Deep Links .稍微棘手的部分是弄清楚深层链接的语法,第一次这样做时会有点混乱,但请查看Create Deep Links的文档。 Once you have the link url itself, then you can send it to the user in the notification, as a regular message, or a card (eg Adaptive Card) or similar.一旦您拥有链接 url 本身,您就可以在通知中将其作为常规消息或卡片(例如自适应卡片)或类似信息发送给用户。

Some Deep Link parts that can be tricky:一些可能很棘手的 Deep Link 部分:

  1. the "App id" is the TEAMS app id (from your Teams Manifest, or from App Studio), NOT the "Microsoft App Id" from the bot itself “应用程序 ID”是 TEAMS 应用程序 ID(来自您的团队清单或来自 App Studio),而不是机器人本身的“Microsoft 应用程序 ID”
  2. The "entity ID" is the "entity id" you registered for your Tab in the Teams manifest (or in App Studio if you used that) “实体 ID”是您在 Teams 清单中为您的选项卡注册的“实体 ID”(或在 App Studio 中,如果您使用的话)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft 团队自定义选项卡,向用户的活动源发送通知 - Microsoft teams custom tab, sending notification to user's activity feed MS Teams:当活动源中有深层链接时,无法获取 SubEntityId 值 - MS Teams: Unable to get the SubEntityId value when a deep link is available in Activity Feed 如何从外部来源向Microsoft Teams活动提要中发送通知 - How to send a notification into Microsoft Teams activity feed from external source 无法从深层链接获取 MS Teams 选项卡应用上的 subEntityId - Cannot get subEntityId on MS Teams tab app from deep link 有没有办法在 MS 团队中发送活动提要通知? - Is there a way to send activity feed notification in MS teams? Microsoft Teams 深层链接到带有 iframe 的选项卡 - Microsoft Teams deep link to tab with iframe 如何突出显示从外部源向 Microsoft Teams 活动源发送通知的消息 - How to highlight the message for which a notification is sent to Microsoft Teams activity feed from external source Microsoft Teams 指向 staticTab 的深层链接仅打开带有清单中默认 URL 的选项卡 - Microsoft Teams deep link to staticTab only opens the tab with the default URL from manifest 是否可以在活动提要的 MS Teams 通知中设置文本格式? - Is it possible to Format text in MS Teams Notification for Activity Feed? Microsoft Teams:如何在活动源中使用自定义通知打开外部 URL? - Microsoft Teams: How to open external URL with custom notification in activity feed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM