Failed to send Push Notification

前端 未结 1 576
感情败类
感情败类 2020-12-22 10:10

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).<

相关标签:
1条回答
  • 2020-12-22 10:41

    $data and $registration_id must be an array to work with push notifications. so it should be like.

    $data = array(
        "registration_ids" => array($registration_id),
        "data" => array(
            "body" => $message,
        ),
    );
    
    0 讨论(0)
提交回复
热议问题