[英]get User API key with php-pushover push notifications to iOS & Android
我想使用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憑據獲取的服務器API,很好。
但是:setUser(用戶的API密鑰)-從哪里可以獲取用戶API? 注意:我想將通知推送到查詢選擇它們的特定設備,而我正在使用Cordova 3.4。
感謝先進。
每個Pushover用戶都有自己的API密鑰。 Pushover使用此密鑰將其消息發送給正確的用戶。
您可以在http://pushover.net上的個人資料頁面上找到該密鑰。 只需登錄並在那里獲取您的密鑰即可。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.