Est-ce que quelqu’un peut m’expliquer ça..
dans mon bot messenger j’ai le code suivant:
entry.messaging.forEach(async function (webhookEvent) {
// Discard uninteresting events
if ("read" in webhookEvent) {
console.log("Got a read event");
return;
} else if ("delivery" in webhookEvent) {
console.log("Got a delivery event");
return;
} else if (webhookEvent.message && webhookEvent.message.is_echo) {
console.log(
"Got an echo of our send, mid = " + webhookEvent.message.mid
);
return;
}
L’erreur que j’obtiens :
entry.messaging.forEach( /*#__PURE__*/function () {
TypeError: Cannot read properties of undefined (reading 'forEach')