Tutorial by Examples

Presence works by sending messages when a user joins, leaves, or times out from a particular channel. You can listen for these messages to track who is in a channel, and how long since they did anything. First, make sure each user as a UUID. Set this when you initialize PubNub: var pubnub = PUBNUB...
When a user subscribes to a channel, you may want to set state for that newly subscribed user. While there is a subscribe with state API, there are some scenarios where this is not the most optimal/reliable technique (like during a disconnect/reconnect situation - the state will be lost and not rein...

Page 1 of 1