我想使用PHP-pushhover将通知推送到特定设备/ Android
<?php include('Pushover.php');
$push = new Pushover();
$push->setToken('app token goes here');
$push->setUser('user token goes here');
$push->setTitle('Hey Chris');
$push->setMessage('Hello world! ' .time());
$push->setUrl('http://chris.schalenborgh.be/blog/');
$push->setUrlTitle('cool php blog');
$push->setDevice('iPhone');
$push->setPriority(0);
$push->setTimestamp(time());
$push->setDebug(false);
$go = $push->send(); ?>
我的问题是: setToken(您的应用API密钥) 这是从Google Project Credentials获取的服务器API,没关系。
但是:setUser(用户的API密钥) - 从哪里可以获得用户API? 注意:我想将通知推送到查询选择它们的特定设备,而我使用的是Cordova 3.4。
感谢先进。
答案 0 :(得分:0)
每个Pushover用户都有自己的API密钥。 Pushover使用此密钥将其消息发送给正确的用户。
您可以在http://pushover.net的个人资料页面找到该密钥。只需登录并抓住你的钥匙。