我发送带有信号api的通知
String strJsonBody = "{"
+ "\"app_id\": \"" + APP_ID + "\","
+ "\"included_segments\": [\"All\"],"
+ "\"filters\": [{\"field\": \"tag \", \"key \": \"" + key + " \", \"relation \": \"=\", \"value\": \"1\"}],"
+ "\"data\": {\"news_id\": \"" + newsId + "\"},"
+ "\"contents\": {\"en\": \"" + newsTitle + "\"}"
+ "}";
并获取错误{“errors”:[“tag不是有效的过滤器字段。”]}
答案 0 :(得分:0)
删除单词
之间的所有空格String strJsonBody = "{"
+ "\"app_id\": \"" + APP_ID + "\","
+ "\"included_segments\": [\"All\"],"
+ "\"filters\": [{\"field\": \"tag\", \"key\": \"" + key + "\", \"relation \": \"=\", \"value\": \"1\"}],"
+ "\"data\": {\"news_id\": \"" + newsId + "\"},"
+ "\"contents\": {\"en\": \"" + newsTitle + "\"}"
+ "}";