我已使用ngrok将漫游器连接到我的Facebook页面。然后,我相应地填写了访问令牌,应用程序ID和应用程序密钥。访问令牌是Facebook生成的令牌,应用程序ID是我的应用程序ID,应用程序密码是我给的(现在是1234567)。我不知道什么是验证令牌!因此,我也将访问令牌也放在了验证令牌上。每次我启动Botpress应用程序时,都会显示以下消息。
{ message: 'An error has been returned by Facebook API.\nStatus: 400 (Bad Request)\nError validating client secret.',
stack: 'Error: An error has been returned by Facebook API.\nStatus: 400 (Bad Request)\nError validating client secret.\n at /home/a_o/projects/truck-kothay-bot/node_modules/@botpress/channel-messenger/bin/webpack:/src/messenger.js:594:15\n at PassThroughHandlerContext.finallyHandler (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/finally.js:56:23)\n at PassThroughHandlerContext.tryCatcher (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/promise.js:512:31)\n at Promise._settlePromise (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/promise.js:569:18)\n at Promise._settlePromise0 (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/promise.js:614:10)\n at Promise._settlePromises (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/promise.js:694:18)\n at _drainQueueStep (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/async.js:138:12)\n at _drainQueue (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/async.js:131:9)\n at Async._drainQueues (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/async.js:147:5)\n at Immediate.Async.drainQueues (/home/a_o/projects/truck-kothay-bot/node_modules/bluebird/js/release/async.js:17:14)\n at runCallback (timers.js:794:20)\n at tryOnImmediate (timers.js:752:5)\n at processImmediate [as _immediateCallback] (timers.js:729:5)' }
我的Botpress框架在10.51.1中运行,节点为> 8和<11。 这是我的频道信使配置文件
"applicationID": "App ID from facebook",
"accessToken": "Access Token from Facebook",
"appSecret": "1234567",
"verifyToken": "What this verify Token is for?",
"hostname": "http://ab97a8db.ngrok.io/",
Botpress网站网址:https://botpress.io/
我使用了最后一个版本,这验证了令牌选项当时是否存在。我从来没有用Javascript编码过,我只是在升级其他人的代码库。 TIA