Messenger webhook 错误(curl_errno = 28)
Messenger webhook error (curl_errno = 28)
这是我的 node.js 代码
var fs = require("fs"),
https = require("https"),
express = require("express"),
app = express();
https.createServer({
ca: fs.readFileSync("sslcert/cpanel.ca"),
key: fs.readFileSync("sslcert/cpanel.key"),
cert: fs.readFileSync("sslcert/cpanel.crt"),
}, app).listen(444, function() {
console.log("I'm working :)");
});
app.get("/webhook/", function(req, res) {
if (req.query["hub.verify_token"] === "token") {
res.send(req.query["hub.challenge"]);
} else {
res.send("Error, wrong validation token");
}
});
而且我总是在 Facebook 的 "New Page Subscription" 页面上收到此错误。
The URL couldn't be validated. Callback verification failed with the following errors: curl_errno = 28; curl_error = Operation timed out after 0 milliseconds with 0 out of 0 bytes received; HTTP Message = Unknown Response Code
我的代码有问题吗?
当 https://host:port/ 不可访问时会发生此错误。确保 URL 可以从防火墙外部访问。
这是我的 node.js 代码
var fs = require("fs"),
https = require("https"),
express = require("express"),
app = express();
https.createServer({
ca: fs.readFileSync("sslcert/cpanel.ca"),
key: fs.readFileSync("sslcert/cpanel.key"),
cert: fs.readFileSync("sslcert/cpanel.crt"),
}, app).listen(444, function() {
console.log("I'm working :)");
});
app.get("/webhook/", function(req, res) {
if (req.query["hub.verify_token"] === "token") {
res.send(req.query["hub.challenge"]);
} else {
res.send("Error, wrong validation token");
}
});
而且我总是在 Facebook 的 "New Page Subscription" 页面上收到此错误。
The URL couldn't be validated. Callback verification failed with the following errors: curl_errno = 28; curl_error = Operation timed out after 0 milliseconds with 0 out of 0 bytes received; HTTP Message = Unknown Response Code
我的代码有问题吗?
当 https://host:port/ 不可访问时会发生此错误。确保 URL 可以从防火墙外部访问。