Rim*_*Rim 6 facebook-messenger vue.js facebook-chatbot nuxt.js facebook-customer-chat
我正在使用Facebook Messenger 客户聊天 SDK将其实现到我的 Nuxt 应用程序中。
解决方案 1(有效 0%):
我尝试了https://www.npmjs.com/package/vue-fb-customer-chat包,但它不起作用,该包的站点本身已关闭 -.-!我导入它并将其用作插件等,我完全按照说明进行操作,我什至尝试使用<VueFbCustomerChat />和<vue-fb-customer-chat />作为额外的工具,但似乎没有任何效果!
解决方案2(工作了50%):
此外,我尝试通过创建一个名为的静态文件来将其用作静态文件fb-sdk.js并成功部署它:
window.fbAsyncInit = function() {
FB.init({
xfbml: true,
version: "v6.0"
})
}
;(function(d, s, id) {
var js,
fjs = d.getElementsByTagName(s)[0]
if (d.getElementById(id)) return
js = d.createElement(s)
js.id = id
js.src = "https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js"
fjs.parentNode.insertBefore(js, fjs)
})(document, "script", "facebook-jssdk")
Run Code Online (Sandbox Code Playgroud)

但当我开始使用它聊天时出现此错误:
ErrorUtils caught an error:
a.substr is not a function. [Caught in: React reported an error]
Subsequent errors won't be logged; see https://fburl.com/debugjs.
Run Code Online (Sandbox Code Playgroud)
聊天框出现然后消失,然后就不能点击了@@
所以请帮我将Facebook Messenger 客户聊天 SDK添加到NuxtJS中,有软件包吗?分步教程?
| 归档时间: |
|
| 查看次数: |
7341 次 |
| 最近记录: |