【发布时间】:2023-04-02 02:32:01
【问题描述】:
我正在构建一个 Windows Phone 8.1 应用程序并希望添加来自 Windows Azure 的推送通知。我正在使用 CreatePushNotificationChannelForApplicationAsync 创建通道,然后获取生成的 URI 并将其存储在 Azure 数据库中。尝试使用 push.wns.sendToastText01 发送推送通知时,我在 Azure 日志中收到以下错误:
脚本“/table/Message.insert.js”中的错误。错误:400 - 提供了无效标签“https://db3.notify.windows.com/?token=AwYAAAC3tTi3W5ItZ0hWdZ3FLmELt%2flHcwpsM...”。有效的标记字符是字母数字、_、@、-、.、: 和 #。
我注意到频道 URI 包含没有出现在有效字符中的“%”,但这是在客户端应用程序中生成的 URI。我是否使用了错误的方法来发送推送通知,或者我还遗漏了什么?
编辑:我在 Azure 中使用 Node.js 作为后端。
request.execute({
success: function() {
push.wns.sendToastText01(channelUri, {
text1: "Google Plus Friend Tracker",
text2: item.content,
param: '/ChatPage.xaml?friendGoogleId=' + item.author_id
})
}
});
【问题讨论】:
-
你能说得更具体点吗?你在使用 JS 后端吗?能提供一些sn-ps的代码吗?
-
感谢您的回复,我已经更新了我的问题。
标签: push-notification windows-phone-8.1 azure-mobile-services