dongxiangchan0743 2016-06-27 15:07
浏览 58

twilio ip messaging在几个浏览器选项卡中

I'm trying to implement Twilio ip messaging. I've got a problem - when another tab with the chat is opened, chat stops recieving any messages in original browser tab. How can be this problem handled?

  • 写回答

1条回答 默认 最新

  • dongmisa4779 2016-06-28 17:02
    关注

    This likely has to do with the fact that your endpoint_id value is the same for all the endpoints. This causes the problem that IP Messaging cannot disambiguate the endpoints (subscribed and connected) to send the message (and other) events to.

    This guide describes how to generate endpoint_id values, and why it is important: https://www.twilio.com/docs/api/ip-messaging/guides/identity

    An excerpt highlighting the specific area to focus on:

    About Endpoint IDs

    An "endpoint" in IP messaging is a unique app, device, and user combination that can receive a message.

    For example, "alice@example.com" using "SquareChat" on her iPhone is a different message delivery destination (endpoint) than "alice@example.com" using "SquareChat" on her Kindle Fire tablet.

    The endpoint ID you generate on the server - while it can be a string in any format you want - should integrate at least these three dimensions.

    Once your client receives an Access Token from your server, you can initialize the Twilio IP Messaging SDK and start sending and receiving messages.

    Please note that if the same user logs in from 3 different endpoints - they should all have the same identity - but each of the endpoints should have a different endpoint_id - where the identity portion of the endpoint_id would be the same, but the other elements (application and device ids) should be different.

    评论

报告相同问题?

悬赏问题

  • ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 虚心请教几个问题,小生先有礼了
  • ¥30 截图中的mathematics程序转换成matlab