I try to send a message, but get nothing. Although no fails, when printing the variable:
$result
this returns \"to\" (I have no idea why).<
$data and $registration_id must be an array to work with push notifications. so it should be like.
$data
$registration_id
$data = array( "registration_ids" => array($registration_id), "data" => array( "body" => $message, ), );