Facebook Messenger API: Trouble setting up a webhook

前端 未结 6 601
说谎
说谎 2020-12-31 03:25

I am trying to set up a web hook for the new Facebook Messenger bot platform on my PHP webserver and am receiving this error:

The URL couldn\'t be val

6条回答
  •  Happy的楠姐
    2020-12-31 04:04

    If you're running this as a Node.js application, and you're coming from the The Facebook Quickstart Guide mentioned in the question, you'll have to point the webhook URL to [your-server-root]/webhook. Notice this part of the tutorial:

    // Adds support for GET requests to our webhook
    app.get('/webhook', (req, res) => {
        ...
        // Responds with the challenge token from the request
        res.status(200).send(challenge);
    });
    

提交回复
热议问题