Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dialogflow es I';我不会通过使用谷歌库上的操作来获取heroku的webhook帖子请求_Dialogflow Es_Actions On Google - Fatal编程技术网

Dialogflow es I';我不会通过使用谷歌库上的操作来获取heroku的webhook帖子请求

Dialogflow es I';我不会通过使用谷歌库上的操作来获取heroku的webhook帖子请求,dialogflow-es,actions-on-google,Dialogflow Es,Actions On Google,嗨,我面临一个问题,如果我在谷歌图书馆上使用动作,我就不会收到heroku的webhook帖子请求。但是当我使用dialogflow实现时,我将使用 webhookclient({request:req,resp}) 我必须使用heroku,别无选择。是否只对firebase有效?。 还有一个问题,当我使用google mini设备进行测试时,我无法获得设备的粗略位置,但它在模拟器中运行良好。它们是否与上述问题有关 这是我目前的代码 const {dialogflow,Permission,Li

嗨,我面临一个问题,如果我在谷歌图书馆上使用动作,我就不会收到heroku的webhook帖子请求。但是当我使用dialogflow实现时,我将使用

webhookclient({request:req,resp})

我必须使用heroku,别无选择。是否只对firebase有效?。 还有一个问题,当我使用google mini设备进行测试时,我无法获得设备的粗略位置,但它在模拟器中运行良好。它们是否与上述问题有关

这是我目前的代码

const {dialogflow,Permission,List} = require('actions-on-google');
const {WebhookClient} = require('dialogflow-fulfillment');
const express = require('express');
const server = express();
server.post('/',function(req,res){
const agent = new WebhookClient({ request: req, response: res });
let intentMap = new Map();
intentMap.set('Default Welcome Intent', welcome);
agent.handleRequest(intentMap);
});
server.listen((process.env.PORT || 3000), function () {
    console.log("Server listening");
});
要与Google上的操作一起使用,请遵循类似于以下内容的代码段:

const express = require('express')
const bodyParser = require('body-parser')

// ... app code here

const expressApp = express().use(bodyParser.json())

expressApp.post('/fulfillment', app)

expressApp.listen(3000)