2016-10-25 74 views
1

这是我的样品红宝石POST请求到FCM云信息,我需要调度推送通知的交货时间我怎样才能在火力计划从Rails的POST请求

require 'httparty' 
require 'json' 

result = HTTParty.post('http://fcm.googleapis.com/fcm/send', 
    :body => { "to" => "< Sample FCM token>", 
     "priority" => "high", 
     "notification" => { 
     "title" => 'Hello World', 
     "body" => "Test Message !" 
     }}.to_json, 

    :headers => { 'Content-Type' => 'application/json', 'Authorization' => 'key=<FCM Key>' }) 

回答

1

如果你正在寻找一个公共FCM的API可用于预定的推送或有效载荷参数,您可以在其中设置推送日期,但不幸的是,目前没有任何类似的推送日期。

您必须在自己的应用服务器中实现它,并自己实施计划推送(也提到它here)。