Reputation: 31
I keep getting double requests on to my webhook when trying to create a Facebook bot. I don't know why or how to stop this. My code seems standard.
I'm using the request module in Node.js to send responses.
Is this a known issue or is there a Node based way to mitigate this?
Upvotes: 1
Views: 2256
Reputation: 6926
I've been seeing multiple deliveries on my bots for two reasons:
200 - OK
within 15 seconds, FB will retry to request a second time.message_deliveries
event, FB will send you delivery receipts.One way to handle duplicate deliveries is to keep track of the last seq
value that your bot saw. Obviously if you are load balancing webhooks requests across a pool of servers (eg on Heroku), you will have to share the last seen seq
value across all your instances.
Upvotes: 6
Reputation: 979
Did you also register for the message_deliveries event for your webhook? If yes it will send you the message deliveries for confirmation.
Upvotes: 1