【发布时间】:2018-08-05 18:41:20
【问题描述】:
代码
const payload ={
notification: {
title: '${userName}',
body: "You have recieved a new Message",
icon: "default",
click_action : "com.appmaster.akash.messageplus_TARGET_NOTIFICATION"
},
data : {
from_user_id : from_user_id;
from_user_name : userName
}
};
获取“,”的意外标记 但是当我删除它时,我收到了'from_user_name'的错误......我猜错误在于分离了2个数据......有人可以帮助我吗
【问题讨论】:
-
from_user_id;->from_user_id, -
fromuserid 和 name 是单独的数据...我的问题我如何将它们分开
-
在 JSON 中,您使用
,分隔值。所以from_user_id : from_user_id,.
标签: javascript android firebase push-notification