【问题标题】:When making a chatbot using botman and larvel the botman chatframe isn't working properly使用 botman 和 larvel 制作聊天机器人时,botman 聊天框无法正常工作
【发布时间】:2021-01-22 19:25:29
【问题描述】:

botman 小部件看起来不错,但是当我打开它查看聊天框时,它在聊天框内显示错误 404。

这是我声明 botman 小部件的部分

<script>
    var botmanWidget = {
        frameEndpoint:'https://www.youtube.com/'
        aboutText: 'ssdsd',
        introMessage: "✋ Hi! I'm form ItSolutionStuff.com"
        title: 'BotMan'
    };
</script>
<script src='https://cdn.jsdelivr.net/npm/botman-web-widget@0/build/js/widget.js'></script>

这是botmanWidget引用的chat.html文件

<html>
    <head>
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/botman-web-widget@0/build/assets/css/chat.min.css">
    <title>BOtMANS</title>
    </head>
    <body>
    <script id="botmanWidget" src='https://cdn.jsdelivr.net/npm/botman-web-widget@0/build/js/chat.js'></script>
    </body>
</html>

【问题讨论】:

    标签: php html laravel botman


    【解决方案1】:

    frameEndpoint 应该是一个 URL。所以要么你输入一个绝对 URL,f。前任。 https://your-url.com 或带有正斜杠的相对/,f。前任。 /config/botman/chat.html.

    您可以通过使用您运行网站的当前域并附加/config/botman/chat.html 来测试您的框架页面是否可调用。

    【讨论】:

    • 我像这样编辑了我的代码,但它仍然给出错误 404,我尝试添加一个站点的完整 URL,但它也没有工作 @codedge `
    • 您能否编辑您的帖子并显示带有完整 URL 的示例?如果完整 URL 示例不起作用,则无法打开指向 frameEndpoint URL 的 URL。这不是 botman 的问题,而是您的应用程序的问题。
    • 我编辑了代码以打开 youtube,但它仍然无法正常工作
    猜你喜欢
    • 2019-11-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多