forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpn_message.html
More file actions
49 lines (35 loc) · 767 Bytes
/
pn_message.html
File metadata and controls
49 lines (35 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div id=pubnub></div>
<script src="../pubnub.js"></script>
<script>(function(){
var pubnub = PUBNUB({
publish_key : "demo",
subscribe_key : "demo"
});
var a = PNmessage()
a.pubnub = pubnub;
a.callback = console.log
a.error = console.log
a.channel = 'my_channel'
a.gcm = ['i am gcm array']
a.apns.alert = "this is alert"
a.apns.badge = 2
a.apns.key = "hi am apns"
a.send()
var b = PNmessage()
b.pubnub = pubnub;
b.callback = console.log
b.error = console.log
b.channel = 'my_channel'
b.send()
var c = PNmessage()
c.pubnub = pubnub;
c.callback = console.log
c.error = console.log
c.channel = 'my_channel'
c.gcm = ['i am gcm array']
c.apns.alert = "this is alert"
c.apns.badge = 2
c.apns.key = "hi am apns"
c.mykey = "hi"
c.send()
})();</script>