<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
</head>
<body>
<div id="bot"/>
<script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
<script>
BotChat.App({
directLine: { secret: direct_line_secret },
user: { id: 'userid' },
bot: { id: 'botid' },
resize: 'detect'
}, document.getElementById("bot"));
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我有这样的代码嵌入机器人的使用直接行API,而不是通常的iframe实时聊天,但是当我把我的directline私有密钥,机器人占据整个网页.我需要它显示在网页的右下角,当用户点击它时弹出为生活聊天.请有人指导我实现这一目标.谢谢