Parse.com - 使用来自Installation的objectId作为参数发送Push通知

时间:2016-01-21 11:31:47

标签: parse-platform httprequest

我尝试使用 Parse.com API 。 我想通过发送推送通知给特定设备 在 _Installation 中使用 objectId

这是我在POST中发送的参数:

{
    "data":
    {
        "alert":"Message to send"
    },
    "where":
    {
        "user":
        {
            "__type":"Pointer",
            "className":"_Installation",
            "objectId":"GfdbNwJhr6"
        } 
    } 
}

响应返回:

{
    "result": true
}

但是我的设备上没有收到任何通知......

我也尝试将"user":"_type"更改为"installation":"_type"

仍然无法工作......

1 个答案:

答案 0 :(得分:0)

Nvm,找到了解决方案:

    {
      "data": 
             { 
                "alert": "321213", "sound": "", "badge": "Increment" 
             },
      "where": 
             { 
                "objectId": "GfdbNwJhr6" 
             }
    }
相关问题