c# - ParsePush throws Exception 400 in Unity -


i have written function send push notification request server. using unity parse. when send request parse.parseexception: 400: bad request.

the idea send notification 1 player letting them know have been attacked player. can see i've done wrong?

debug.log ("<color=#ffa500ff> sending push notification </color>");     string pushmsg = "you attacked " + serverdata.instance.my_player.username;     if(!serverdata.instance.pvp.pvpopponentdata.attackerwon)         pushmsg += " , lost fight.";     else         pushmsg += " , won fight!";      debug.log(pushmsg);      parsepush push = new parsepush();     push.query = parseinstallation.query.whereequalto("player",parseobject.createwithoutdata("player",serverdata.instance.pvp.pvpopponentdata.targetobjectid));     push.data = new dictionary<string, object> {         {"title", serverdata.instance.pvp.pvpopponentdata.bragmessage},         {"alert", pushmsg}     };     push.sendasync().continuewith(p =>                                   {         if(sutil.isnotparseerror(p))         {             debug.log ("<color=#ffa500ff> push notification sent! </color>");         }         else         {             debug.log ("<color=#ffa500ff> push notification failed!\n" + p.exception.message + "</color>");         }     }); 


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -