我已经使用Dialogflow SDK和Firebase函数开发了一个操作。我使用conv.user.storage在两次对话之间保存用户ID。但是,每次用户执行操作时,操作都无法识别保存的ID,并显示为“未定义”。我已经开发这个动作有一段时间了,我在2-3个月前为测试创建的用户拥有conv.user.storage,他们可以被识别。存储数据或其他东西有限制吗?
下面是我的代码:
if (!conv.user.storage.userId || typeof conv.user.storage.userId === "undefined") {
conv.user.storage.userId = uuidv1();
console.log("new implemented userID.", conv.user.storage.userId);
}
else {
console.log("ID from storage", conv.user.storage.userId);
}
发布于 2019-03-15 23:35:05
我想这个conv.user.storage不能正常工作!即使在语音匹配和允许隐私设置的情况下,它也不适用于我!你也可以在here上看到它。Google support建议我使用Google帐户链接从用户那里获取唯一的用户id,并将其保存到数据库中。这是帐户链接的文档:https://developers.google.com/actions/identity/google-sign-in
发布于 2019-05-27 20:10:48
我和你面临着同样的问题..我在这个comment中找到了github问题的修复。基本上,当在Activity Center中启用Web和App权限时,您还需要选中“include chrome history...”。
发布于 2019-03-14 19:22:39
您的工作流可能没有设置为允许一致地存储用户数据。您可以查看有关数据过期的文档。
https://developers.google.com/actions/assistant/save-data#user_storage_expiration
如果您使用的是智能扬声器,请确保设置了语音匹配。并确保您打开了所有必要的权限。
https://stackoverflow.com/questions/55158864
复制相似问题