amronrails / Rails-Messenger-Bot

Building a messenger bot using ruby on rails
1 stars 4 forks source link

Wrong answer to facebook challenge #1

Open Guillaumejfrt opened 7 years ago

Guillaumejfrt commented 7 years ago

Hi,

I have just followed all your process through the youtube, however I still have the same message when I try to edit the webhook (I say "edit" because I succeeded in validating the webhook the first time without any controller method, but I disconnected ngrok so I have to edit the callback url): render text: params["hub.challenge"] does not work correctly since Facebook receives html: "\u003C!DOCTYPE html>\n\u003Chtm..." or an empty string: "\n" if I add layout:false at the end of the render. I am not able to render to Facebook what hub.challengecontains.

Could you help resolve this bug? Thanks a lot Guillaume

amronrails commented 7 years ago

Can you show me your controller code? On Jul 28, 2017, at 6:39 AM, Guillaumejfrt notifications@github.com<mailto:notifications@github.com> wrote:

amronrails commented 7 years ago

and also the routes

On Jul 28, 2017, at 6:57 AM, Outlook amre.abdelhady@outlook.com<mailto:amre.abdelhady@outlook.com> wrote:

Can you show me your controller code? On Jul 28, 2017, at 6:39 AM, Guillaumejfrt notifications@github.com<mailto:notifications@github.com> wrote:

Guillaumejfrt commented 7 years ago

@amronrails I found my mistake. In fact, I am using facebook-messenger gem so I realised I do not need to create a controller and a controller method to answer facebook challenge. The gem is dealing with it.

Sorry for disturbing you. Your video still helps me.

Have a nice day. Guillaume