I am trying to integrate facebook bot for my business page and followed this
Copied js code given to setup webhook and created a .js file... but when i tried to verify and save the message it showed was "The URL couldn't be validated. Response does not match challenge, expected value = '1227072936', received=' app.get('/webho...'".
I am .net developer and have no idea of javascript coding.
Can anyone suggest me where i am going wrong?
This is my code while verify web hook in java
i just create a serlvet with dopost method and then git the request parameters like below .. sure you have something like that in .net
String token = req.getParameter("hub.verify_token");
if (token != null && !token.equals("")) {
resp.setContentType("text/html");
if (token.equals("{verified_token}")) {
String challenge = req.getParameter("hub.challenge");
System.out.println("I am WebHock Verification --------> ");
}
}
{verified_token}
is the token i added while verify my webhook url
the webhook url in the image below replaced by my serlvet URL : I hope that help you
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.