Skip to content

Instantly share code, notes, and snippets.

@betiol
Created May 24, 2017 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betiol/4a8729b9ef5c4399bc0923e252e895bb to your computer and use it in GitHub Desktop.
Save betiol/4a8729b9ef5c4399bc0923e252e895bb to your computer and use it in GitHub Desktop.
push
require 'fcm'
class FcmTokenController < ApplicationController
def get_token
fcm = FCM.new("AIzaSyCdW3J2UFO5gM1j78w2Jc3rOVa8ADlbE3I")
registration_ids= ['cHOklBgG1hc:APA91bEy505QNSG4GxsEph9hOPkpJQEQdDzBwn5pRiWik6iWlwTuSrfysxHlL81YZMcN9wG-Dyr-tjL0Ucl9J3admf8DVnH47vOuNhd1hE5-SvDrzFnipj01wdUEJwt8lER3p8Y_zefe']
options = {data: {score: "123"}}
fcm.send(registration_ids, options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment