Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Cannot read property 'forEach' of undefined #87

Open
sgkhode opened this issue May 15, 2018 · 1 comment
Open

Getting Cannot read property 'forEach' of undefined #87

sgkhode opened this issue May 15, 2018 · 1 comment

Comments

@sgkhode
Copy link

sgkhode commented May 15, 2018

I am getting error from this piece of code.
` _handleMessage (json) {
let entries = json.entry

entries.forEach((entry) => {
  let events = entry.messaging

  events.forEach((event) => {
    // handle inbound messages and echos
    if (event.message) {
      if (event.message.is_echo) {

`
events is undefined.

What could be the issue here?

@unandreshevia
Copy link

I am getting the same error and it happens when you receive postback-type of message from Facebook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants