Facebook Messenger API“URL COULD NOT BE VALIDATED” [英] Facebook Messenger API "URL COULD NOT BE VALIDATED"
问题描述
我正在尝试设置Facebook messenger API,当我尝试添加WebHook时,我收到此错误:
I'm trying to setup the Facebook messenger API and I'm getting this error when I attempt to add the WebHook:
该网址无法验证。回调验证失败,出现以下错误:curl_errno = 60; curl_error = SSL证书问题:无法获取本地颁发者证书; HTTP状态码= 200; HTTP消息=连接建立
The URL couldn't be validated. Callback verification failed with the following errors: curl_errno = 60; curl_error = SSL certificate problem: unable to get local issuer certificate; HTTP Status Code = 200; HTTP Message = Connection established
我已经使用教程中提供的代码设置了我的NodeJS服务器。以下是网址: https://stackoverload.me/chatter/webhook
I've setup my NodeJS server using the code they provided in the tutorial. Here's the url: https://stackoverload.me/chatter/webhook
编辑这里的解决方案(有人想看代码):
EDIT HERE'S THE RESOLUTION (someone wanted to see the code):
var express = require('express');
var fs = require('fs');
var https = require('https');
var app = express();
app.use(express.static('public'));
// SSL
https.createServer(
{
ca: fs.readFileSync(__dirname + '/server.ca'),
key: fs.readFileSync(__dirname + '/server.key'),
cert: fs.readFileSync(__dirname + '/server.cert')
}
, app).listen(443, function() {
console.log('Server is now running.');
});
// HTTP redirect to SSL
express()
.get('*', function(req,res){
res.redirect('https://example.com' + req.url)
})
.listen(80);
推荐答案
p>忘了回答这个问题,但是我发现我向我的https服务器添加了一个ca文件和参数,然后接受了它。
Forgot to answer this, but I found out that I added a ca file and parameter to my https server and Facebook then accepted it.
这篇关于Facebook Messenger API“URL COULD NOT BE VALIDATED”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!