简体   繁体   中英

How to read parameter value which sent through Chat Control (iframe) from bot

I have integrated a ms bot framework webchat(node js) in to a web page. I am passing the logged in user information by using iframe.

Eg: Like below

<iframe id="myFrame" src='https://webchat.botframework.com/embed/
testbot?s=secret_code&username=admin&userid=1234'></iframe>

Could anyone guide me, how can I read these parameter values from bot.

Thanks in advance.

If you provide a username and userid in the iframe's query parameters, then the activity's .From property will have those values:

<iframe style="width:300px;height:400px;" src='https://webchat.botframework.com/embed/mybotid?s=mybotsecret&username=adminxxx&userid=1234'></iframe>

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM