Nan*_*mar 2 python push-notification
我使用的是ubuntu 14.4.我试图向手机发送推送通知.我在下面的''' https://www.digitalocean.com/community/tutorials/how-to-create-a-server-to-send-push-notifications-with- gcm-to-android-devices-using-python '''它适用于我的本地电脑.相同的代码我在网络服务器尝试,但我无法发送推送通知.我得到错误,如"gcm.gcm.GCMAuthenticationException:验证发件人帐户时出错"我的网络服务器也是ubuntu 14.4.所以请任何人帮助我
gcm.py
from gcm import *
gcm= GCM("as........k")
data={"message from":"123","messageto":"1234","message":"Hi","time":"10.00AM","langid":"1"}
reg_id='AP...JBA'
gcm.plaintext_request(registration_id=reg_id,data=data)
Run Code Online (Sandbox Code Playgroud)
我在白名单中添加了我的服务器IP,但我仍然得到同样的错误
| 归档时间: |
|
| 查看次数: |
1713 次 |
| 最近记录: |