Looking in to using PubNub to send real-time updates to the user\'s web browser.
I looked over their website and materials. It looks like they have a few different o
This is an example of a Facebook-like Window Box that notifies your user with a custom message via PubNub. You can send updates to your users on their Mobile Phone or Browser. This will show your user a notification; any notification you.
Using PubNub allows Data Push via WebSockets, BOSH, Comet and other Mechanisms to be used in your application providing you the ability to send data AT ANY TIME directly to your users via MASS BROADCAST or INDIVIDUAL NOTIFICATIONS.
Try it Now: http://pubnub-demo.s3.amazonaws.com/facebook-notification/index.html
Download Source Code: https://github.com/pubnub/javascript/tree/master/examples/facebook-notification
Begin here for easy copy/paste of code. It is very easy to get started and we recommend you start with the example link above before you begin.
First include the FBootstrap resources in order to provide the look and feel of the notification window. Add these Styles to your HTML file.
Next you need to setup a PubNub Data Connection and then add rules for what to do with the data once it is received.
Next you will want to add this python
code
to your Django or any other framework.
You can add this to the message post
code in your app.
This will post a notification to your user.
This specific example will cause a notification to appear
inside the Facebook Notification page.
pip install pubnub
## PubNub Setup
import pubnub from Pubnub
pubnub = Pubnub( 'demo', 'demo', None, False )
## Push Notice to 'example-user-id-1234'
info = pubnub.publish({
'channel' : 'example-user-id-1234',
'message' : { 'your-data' : 'any-data-here' }
})
print(info)