Skip to content

Commit bea4f94

Browse files
kragejkashif
authored andcommitted
Fix "example sending notifications" in README.md (#53)
The old example referenced GCM, and used GCM options. This commit changes the reference URL to the relevant Firebase document, and updates the example with correct options.
1 parent ed087e1 commit bea4f94

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@ fcm = FCM.new("my_server_key")
4545

4646
registration_ids= ["12", "13"] # an array of one or more client registration tokens
4747

48-
# See https://developers.google.com/cloud-messaging/http for all available options.
48+
# See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages for all available options.
4949
options = { "notification": {
5050
"title": "Portugal vs. Denmark",
51-
"text": "5 to 1"
52-
},
53-
"to" : "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..."
51+
"body": "5 to 1"
52+
}
5453
}
5554
response = fcm.send(registration_ids, options)
5655
```

0 commit comments

Comments
 (0)