How to add iframe of rocket chat in website

99封情书 提交于 2019-12-12 10:22:34

问题


As i have read rocket chat documentation for i frame automatically login i follow these steps

  1. Go to Adminstration > Accounts > Iframe and enable it.
  2. Hit rest api and got userId and authToken . But from where i got iframe code and how can i integrate it with application

Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR', callback); I got this error : Uncaught ReferenceError: Meteor is not defined

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


回答1:


Use IframeId with meteor call as below

document.getElementById(iframeId).Meteor.loginWithToken('3wzsXzG53AN5qU_byQVZZNt79oh5wviOMpwB2IHOyHR');



来源:https://stackoverflow.com/questions/48095976/how-to-add-iframe-of-rocket-chat-in-website

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!