jgorset / facebook-messenger

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

Always getting 400 errors #175

Closed noozo closed 7 years ago

noozo commented 7 years ago

Hello, first of all thanks for the excellent gem.

I'm having trouble getting my bot to receive messages. I've tried both ngrok locally and deploying to heroku. I basically can get the verification working, and i do receive the post requests on rails. But then i don't get anything hitting the Bot.on :message part of the code.

On ngrok UI i see a 400 error whenever i get a post request, with the message "Error checking message integrity". Any ideas what that might be?

Thanks again!

jgorset commented 7 years ago

Thanks, and yep! Facebook signs all its requests with your secret key, so that you know it's coming from Facebook. Are you sure that you've configured your bot correctly?

noozo commented 7 years ago

I changed to a different messenger gem and it worked with no core changes, so i'm pretty sure there is something there that is not working for me :(

Pedro

On Thu, Sep 21, 2017 at 11:49 AM, Johannes Gorset notifications@github.com wrote:

Thanks, and yep! Facebook signs all its requests with your secret key, so that you know it's coming from Facebook. Are you sure that you've configured your bot correctly?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jgorset/facebook-messenger/issues/175#issuecomment-331121637, or mute the thread https://github.com/notifications/unsubscribe-auth/AAANGfcfKPjIsRWeSPSsb4KjEYUvRCR-ks5skj8xgaJpZM4PV-yg .

noozo commented 7 years ago

This one: https://github.com/netguru/messenger-ruby

Maybe they do something different, i don't know :(

Pedro

On Thu, Sep 21, 2017 at 12:16 PM, Pedro Assunção assuncas@gmail.com wrote:

I changed to a different messenger gem and it worked with no core changes, so i'm pretty sure there is something there that is not working for me :(

Pedro

On Thu, Sep 21, 2017 at 11:49 AM, Johannes Gorset < notifications@github.com> wrote:

Thanks, and yep! Facebook signs all its requests with your secret key, so that you know it's coming from Facebook. Are you sure that you've configured your bot correctly?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jgorset/facebook-messenger/issues/175#issuecomment-331121637, or mute the thread https://github.com/notifications/unsubscribe-auth/AAANGfcfKPjIsRWeSPSsb4KjEYUvRCR-ks5skj8xgaJpZM4PV-yg .

jgorset commented 7 years ago

Alright, well, glad you got that to work! :)