如何使用PHP使用城市飞艇的深层链接 [英] How to use Deep link of urban airship using PHP
本文介绍了如何使用PHP使用城市飞艇的深层链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用深层链接参数发送推送通知,但是很不幸,它对我不起作用。我正在使用PHP和curl,我的代码是:
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);
实际上,我想将这些参数解析为我的PHP代码。
Actually I want to parse these params to my PHP code.
有人可以建议我这些参数在做什么吗?我想在我的PHP代码中使用pic的所有参数。
Can someone suggest me what I'm doing wrong with these parameters? I want to use all params of pic in my PHP code.
推荐答案
最后完成,参数看起来像:
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);
这篇关于如何使用PHP使用城市飞艇的深层链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文