3

Following all the MS guidance I can find relating to web chat and directline, but I keep getting the following error no matter what I try from botchat.js:

Object doesn't support property or method 'webSocketActivity$'

Once I get the DirectLine connection I'll be following the backchannel example, but I must be missing something because I can't get past the above error. Here's my working code without my DirectLine channel secret:

<!DOCTYPE html>
<html>
<head>
    <link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
</head>
<body>
    <script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
    <script>
        var botConnection = BotChat.DirectLine({ secret: <my secret> });
    </script>
    <div id="bot"></div>
</body>
</html>
Kyle
  • 33
  • 2

1 Answers1

1

Please use new to create the directline connection instance:

var botConnection = new BotChat.DirectLine({ secret: <my secret> });
Gary Liu
  • 13,758
  • 1
  • 17
  • 32
  • 1
    Wow, thank you. I've been staring at this code for WAY too long. That did the trick. – Kyle Jun 05 '18 at 16:11