如何在网站上添加火箭聊天的iframe [英] How to add iframe of rocket chat in website
问题描述
正如我已阅读i frame自动登录的火箭聊天文档我按照以下步骤操作
As i have read rocket chat documentation for i frame automatically login i follow these steps
- 转到管理>帐户> Iframe并启用它。
- 点击休息api并获得userId和authToken。
但是从哪里获得iframe代码以及如何将其与应用程序集成
Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR',回电话);
我收到此错误:
未捕获的ReferenceError:Meteor未定义
Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR', callback); I got this error : Uncaught ReferenceError: Meteor is not defined
我使用的是火箭服务器网址。请帮助我如何使用iframe登录我们的应用程序时自动登录火箭聊天
And where i used rocket server url . Please help me how can i login in rocket chat automatically when login in our application using iframe
推荐答案
使用iframeId与流星调用如下
Use IframeId with meteor call as below
document.getElementById(iframeId).Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR');
document.getElementById(iframeId).Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR');
这篇关于如何在网站上添加火箭聊天的iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!