pubnub = PUBNUB.secure({
subscribe_key : "#{config.subscribe_key}",
publish_key : "#{config.publish_key}",
origin : 'pubsub.pubnub.com',
ssl : true,
cipher_key : "#{config.publish_key}"
});
pubnub.subscribe({
restore : true,
channel : 'broadcast',
callback : function(data) {
debugger;
new_message_notification(data);
}
});
回调不起作用,但我在浏览器的 NETWORK 选项卡中看到响应。问题出在哪里?