How to use Deep link of urban airship using PHP

為{幸葍}努か 提交于 2019-12-08 10:45:16

问题


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.

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:


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


来源:https://stackoverflow.com/questions/47172541/how-to-use-deep-link-of-urban-airship-using-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!