jgorset / facebook-messenger

Definitely the best way to make Bots on Facebook Messenger with Ruby
MIT License
962 stars 211 forks source link

Postbacks not working #188

Closed gastongouron closed 7 years ago

gastongouron commented 7 years ago

The webhook event messaging_postbacks not being triggered by example code. I used to run a fully functionnal bot and I noticed that postbacks are not working. To reproduce: Use bot from example folder till question about progrmming and you will see the following code is not triggered and you receive literally no logs on the server:

Bot.on :postback do |postback|
  case postback.payload
  when 'GET_STARTED_PAYLOAD'
    text = 'TRIGGER GETSTARTED YAY'
  when 'HUMAN_LIKED'
    text = 'That makes bot happy!'
  when 'HUMAN_DISLIKED'
    text = 'Oh.'
  end

  postback.reply(
    text: text
  )
end

The reason why might be because I didn't subscribed to messaging_postbacks but they are not available anymore on the new fb app platform even with verified app. Any thoughts on this would be very appreciated

Kinds regards