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选项卡中看到响应。 问题在哪里?安全PUBNUB不会触发回拨
'secure'应该纳入'init'并提供额外的设置(例如CIPHER_KEY) –