【问题标题】:Error in PubNub Angularjs, channel groupPubNub Angularjs,频道组中的错误
【发布时间】:2016-05-04 14:42:25
【问题描述】:

我已关注此DOCUMENT 与 PubNub Angularjs,频道组合作。但是我收到了这个错误:

这是我的代码:

Pubnub.init({
  publish_key: constants.PUBNUB_PUBLISH_KEY,
  subscribe_key: constants.PUBNUB_SUBSCRIBE_KEY,
  uuid: $scope.user.IncubatorContactId + "_Layout",
  error: function(error) {
    console.log('Pubnub.init() Error:', error);
  }
});

Pubnub.channel_group_add_channel({
  callback: function(m) {
    console.log('channel_group_add_channel', 'success', m);
  },
  channel: channels[0],
  channel_group: $scope.user.IncubatorContactId
});

有人请帮帮我!

【问题讨论】:

  • 您的频道组名称是什么?你的频道名称是什么?您能否将完整的代码示例提供给 support@pubnub.com(连同您的密钥),以便他们可以重现此内容。

标签: angularjs pubnub


【解决方案1】:

我找到了,channel_group 应该是字符串而不是数字:

channel_group: "" + $scope.user.IncubatorContactId + ""

【讨论】:

  • 我怀疑这与频道或频道组的名称有关。感谢您发布根本原因/解决方案。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-05-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多