在发送推送通知时出现此错误 错误:
{代码:422, 状态:“错误”, 消息:{错误:['没有人可以接收到消息']}, 详细信息:{'$ ref':'$ [“消息”] [“错误”]'}}
我的代码:
var defer = Q.defer();
var params = {
notification_type: 'push',
user: user, // recipients.
environment: (environment == 'production' ? 'production' : 'development'),
message: QB.pushnotifications.base64Encode('Some message')
};
QB.pushnotifications.events.create(params, function(err, response){
if(err) return defer.reject(err);
else return defer.resolve(response);
});
return defer.promise;