如何使用PHP使用城市飞艇的深层链接

时间:2017-11-08 05:58:07

标签: php curl push-notification urbanairship.com

我正在尝试使用深层链接参数发送推送通知,但遗憾的是它不适合我。我正在使用PHP和curl,我的代码是:

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

实际上我想将这些参数解析为我的PHP代码。

enter image description here

有人可以告诉我这些参数我做错了吗?我想在我的PHP代码中使用pic的所有参数。

1 个答案:

答案 0 :(得分:0)

最后完成并参数看起来像:

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