我正在使用微软虚拟助手模板来创建我的聊天BoT。我想在我的天蓝色聊天中显示视频,bot..But视频不工作,特别是当视频来自公司sharepoint位置时。我猜这是由于身份验证问题造成的。如何发送已登录的用户令牌以在聊天窗口中显示视频。
public static VideoCard GetVideoCard()
{
var videoCard = new VideoCard
{
Title = "This my Title",
Subtitle = "by the subtitle",
Text = "t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. distribution of letters,." +
" t is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.ution of letters,.",
Image = new ThumbnailUrl
{
Url = "https://mycompany.rev.vbrick.com/#/videos/11111-db89-11111-b39d-111111",
},
Media = new List<MediaUrl>
{
new MediaUrl()
{
Url="https://mycompany.rev.vbrick.com/#/videos/11111-db89-4bc3-b39d-111111",
},
},
Buttons = new List<CardAction>
{
new CardAction()
{
Title = "Learn More",
Type = ActionTypes.OpenUrl,
Value = "https://mycompany.rev.vbrick.com/#/videos/1111-db89-4bc3-b39d-1111",
},
},
};
return videoCard;
}发布于 2019-07-13 05:26:59
您必须使用use OAuth,即supported by vBrick。
基本上,这些步骤是:
HTTP向用户(here's a good sample)
对于遇到这种情况并想使用来自OneDrive的视频的任何人(我就是这样测试的),OneDrive会验证该URL,然后将您重定向到一个公共下载URL。由于重定向在显卡中不起作用,因此最好的方法是使用MS Graph API、get all OneDrive Items和"@microsoft.graph.downloadUrl"。将视频卡的URL设置为该downloadUrl,然后将该VideoCard发送给用户。
https://stackoverflow.com/questions/56993948
复制相似问题