发送带标签过滤器的推送通知的Onesignal失败,“所有包含的玩家未订阅”

时间:2018-04-20 10:34:37

标签: php curl tags push onesignal

当我向具有以下卷曲的信号发送请求时:

Public Function max_number(s As String) As Double

      Static re As VBScript_RegExp_55.RegExp
      s = Replace(s, ",", "")
      If re Is Nothing Then
        Set re = New RegExp
        re.IgnoreCase = True: re.Global = True
        re.Pattern = "-?\d*\.?\d+"
       End If

     max_number = 0
     For Each elem In re.Execute(s)
        If max_number < CDbl(elem) Then
            max_number = CDbl(elem)
        End If
     Next

End Function

我正在尝试向标签为“Broodjes”的所有订阅用户发送通知。 它所说的任何地方curl -X POST \ https://onesignal.com/api/v1/notifications \ -H 'Authorization: Basic <omitted>' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{ "app_id": "<omitted>", "filters": [ {"field": "tag", "key": "broodjes", "relation": "exists"} ], "contents": {"en": "English Message"} }' 由于显而易见的原因,我省略了这个值。

以下是我得到的意外回应:

omitted

here是我正在尝试通知的用户的图片。

1 个答案:

答案 0 :(得分:0)

事实证明,我的标签末尾有一个尾随空格。