使用地理查询时解析推送通知错误

时间:2015-10-24 19:25:25

标签: curl parse-platform push-notification

请帮忙!!! 我试图通过基于地理查询的Parse发送推送通知。我想我正在完全遵循文档,但得到102错误,说查询无效。

我有一个_Installation类和_User类。 _Installation类有一个名为“user”的列指向_User类(就像指示的解析文档一样)。 _安装类数据: enter image description here _User类数据: enter image description here

我使用的curl命令与描述的解析文档完全相同:

curl -X POST \
  -H "X-Parse-Application-Id:#############" \
  -H "X-Parse-REST-API-Key: #############" \
  -H "Content-Type: application/json" \
  -d '{
        "where": {
          "user": {
            "$inQuery": {
              "location": {
                "$nearSphere": {
                  "__type": "GeoPoint",
                  "latitude": 37.0,
                  "longitude": -122.0
                }
              }
            }
          }
        },
        "data": {
          "alert": "testing!"
        }
      }' \
  https://api.parse.com/1/push

但是在回复中,我得到:{“code”:102,“error”:“%!s的错误类型(MISSING)”}

怎么了?请帮助,我认为至少有少数人有同样的问题。谢谢。

0 个答案:

没有答案
相关问题