Sending push notification toast to windows phone using Parse api through php web services -


i need send push messages web service windows phone. able achieve console, need using php script

code have tried:

    $url = 'https://api.parse.com/1/push';  $appid = 'xxx'; $restkey = 'xxx';    $push_payload = json_encode(array(         "where" => '"devicetype"=>"winrt"',         "data" => array(                 "alert" => "this alert text."         ) ));  $rest = curl_init(); curl_setopt($rest,curlopt_url,$url); curl_setopt($rest,curlopt_port,443); curl_setopt($rest,curlopt_post,1); curl_setopt($rest,curlopt_postfields,$push_payload); curl_setopt($rest,curlopt_httpheader,         array("x-parse-application-id: " . $appid,                 "x-parse-rest-api-key: " . $restkey,                 "content-type: application/json"));                 $response = curl_exec($rest);                 echo $response;                 var_dump($response);     } 

but on dumping response boolean value:false , no notification appears on phone.

try this:

$push_payload = json_encode(array(     "where" => array("devicetype" => "winrt"),          "data"  => array("alert" => "this alert text.") )); 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -