How to use Deep link of urban airship using PHP

2019-06-09 18:55发布

I am trying to send push notification using deep link parameters but unfortunately it is not working for me. I'm using PHP and curl and my code is:

$params = array("audience"=> "all", "notification" => array("alert" => "Push notification from PHP", "actions" => array("app_defined" => array("^+t" => "sec:147", "content" => "http://www.url.com"))), "device_types" => array("android"));
$x = executeCurl('/push/', 'POST', $params);
    print_r($x);

Actually I want to parse these params to my PHP code.

enter image description here

Can someone suggest me what I'm doing wrong with these parameters? I want to use all params of pic in my PHP code.

1条回答
Evening l夕情丶
2楼-- · 2019-06-09 19:47

Finally done and parameter look likes:

$params = array(
    "audience"=> "all", 
    "notification" => array(
        "alert" => "Test msg from PHP with deep linking",
        "actions" => array(
            "open" => array(
                "type" => "deep_link",
                "content" => "your-schema://deeplink/sec/147/det/1245-15454-dfkjd-45554",
            )
        )
    ), 
    "device_types" => array(
            "android", "ios")
);

$x = executeCurl('/push/', 'POST', $params);
print_r($x);
查看更多
登录 后发表回答