简体   繁体   English

Google 上的帐户关联操作

[英]Account Linking Actions On Google

After Sign is done, my output for "Get Signin" intent is not displayed.签名完成后,我的“获取登录”意图的 output 未显示。 Using Google-Sign in使用 Google 登录

app.intent("redeem", (conv) => {
  conv.ask(new SignIn("To redeem "));
})

app.intent("Get Signin", (conv, params, signin) => {
  if (signin.status === 'OK') {
    const payload = conv.user.profile.payload;
    conv.ask(`I got your account details ${payload.name} , how would you like to redeem? `)
    conv.ask(new Suggestions(['QR code'], ['code']));
  }
  else {
    conv.close("Please sign in to redeem");
  }
})

After a successful sign in I get this message:成功登录后,我收到以下消息: 在此处输入图像描述

Dialogflow Get Signin (top part): Dialogflow 获取登录(顶部): 顶部

Dialogflow Get Signin (bottom part): Dialogflow Get Signin(底部): 底部

When the Sign-In completes, it triggers the actions_intent_SIGN_IN Dialogflow event .登录完成后,它会触发actions_intent_SIGN_IN Dialogflow 事件 So your "Get Signin" Intent needs to have this set in the Event field, with no training phrases.因此,您的“获取登录”意图需要在“事件”字段中设置此设置,并且没有训练短语。

It might look something like this它可能看起来像这样事件字段说明

Since you don't have an Event or Training phrases set, that Intent will never be triggered.由于您没有设置 Event 或 Training 短语,因此永远不会触发 Intent。 Instead, when the Sign-in completes, Actions will send the Event, but since there is nothing setup to handle the event in Dialogflow, it will fail to do anything, so it will exit with the error about not responding.相反,当登录完成时,Actions 将发送事件,但由于在 Dialogflow 中没有任何设置来处理事件,因此它将无法执行任何操作,因此它将退出并返回有关未响应的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM