Created
August 1, 2016 10:13
-
-
Save alexfoxy/1e8cdb7c3f127e6594e8e963e39224e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FCM = require('fcm-node'); | |
var fcm = new FCM('AIzaSyBG6IbAtte_4GhjyBtWDp1WnPQA46CB3zM'); | |
var d = { | |
to: "evqXP8gefJc:APA91bGq2zh2mkV6KtDAG9SPWYf5CEkzJtS1ssY0DXYxuljiOc6jSFAuVgTIMU482pVcdYuqBG30WaKgPAfylpvjscs22rWSZxOy6lF7gV1hiolrmo3Yb8lhgFaN0IBtC49SiHbHRx3S", | |
data: { | |
url: "news" | |
}, | |
priority: 'high', | |
content_available: true, | |
notification: { title: 'TEST HELLO', body: '123', sound : "default", badge: "1" } | |
} | |
function send1() { | |
fcm.send(d, function(response){ | |
console.log(response) | |
}); | |
} | |
send1() | |
var d2 = { | |
to: "123", | |
data: { | |
url: "news" | |
}, | |
priority: 'high', | |
content_available: true, | |
notification: { title: 'TEST HELLO', body: '123', sound : "default", badge: "1" } | |
} | |
send2() | |
function send2() { | |
fcm.send(d2, function(response){ | |
console.log(response) | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment