我无法使用facebook-webhook-setup步骤测试我的Webhook

时间:2018-08-07 11:33:42

标签: node.js facebook-webhooks

我在Facebook Setup中正确地完成了所有步骤,但是当我通过发送以下cURL请求来测试Webhook时:curl -H "Content-Type: application/json" -X POST "localhost:1337/webhook" -d '{"object": "page", "entry": [{"messaging": [{"message": "TEST_MESSAGE"}]}]}'程序发送错误。错误是

  

SyntaxError:JSON中位置0处的意外令牌'       在JSON.parse()       在createStrictSyntaxError(C:\ Users \ Kuark \ messenger-webhook \ node_modules \ body-parser \ lib \ types \ json.js:158:10)       在解析时(C:\ Users \ Kuark \ messenger-webhook \ node_modules \ body-parser \ lib \ types \ json.js:83:15)       在C:\ Users \ Kuark \ messenger-webhook \ node_modules \ body-parser \ lib \ read.js:121:18       在invokeCallback(C:\ Users \ Kuark \ messenger-webhook \ node_modules \ raw-body \ index.js:224:16)       完成时(C:\ Users \ Kuark \ messenger-webhook \ node_modules \ raw-body \ index.js:213:7)       在IncomingMessage.onEnd(C:\ Users \ Kuark \ messenger-webhook \ node_modules \ raw-body \ index.js:273:7)       在IncomingMessage.emit(events.js:182:13)       在endReadableNT(_stream_visible.js:1081:12)       在process._tickCallback(internal / process / next_tick.js:63:19)

0 个答案:

没有答案