I am trying to connect Rasa to FB messenger. I have Rasa & Rasa X deployed on GCP with helm etc…
I followed all the directions to set up a FB page and connect Rasa to FB Messenger.
When testing my bot in FB Messenger, I can type in a message to my page but I do not get a response back from Rasa. However, when I check my Rasa X domain, I can see my chats were logged from Facebook and Rasa is responding to my FB messages in Rasa X.
The problem is that I am not getting a response message to pop into messenger. Everything else seems to be running fine.
I am running a base project rasa init, so no custom actions or duckling at the moment. Not sure if this is the problem or not?
This is what I get after running kubectl get pods on my GCP shell:
When you set up your facebook app, you had to select “subscriptions” - did you select the messaging_postback subscription? That’s just the first thing I’d check.
No, the absence of custom actions should not be a problem.
I’m pretty sure that verification step is only if you want to publish your app. Can you see any more details on the facebook side of what is happening when the bot tries to send a message?
@mloubser, no I cant see any errors. I hit f-12 in messenger… no problems. f-12 Rasa X… no problems. Inside FB for Developers… no problems.
I reconnected my page and webhooks… resubscribed everything… I dont see the problem at all. Not sure what else to do.
Im on my personal FB account and messaging my page directly. I even added my friend as a Tester on my app and they didnt get any response either.
I’m getting a ton of 200 GET requests rolling in. Its recognizing my messages and saying its sending a response on the bottom right hand corner. Must be something to do with Facebook. Because Rasa seems to be working Okay.
@mloubser, do you have any other suggestions? A response is definitely being sent to FB Messenger no?
I was thinking about starting all over again but setting up the FB app / page first and then integrate Rasa. I think there is something wrong with facebook and it is blocking my messages.
I’m sorry I don’t have a better suggestion - It does sound like a response is being sent. I know it’s a pain to re set up the app/page, but there are a lot of settings in that process that can be hard to identify after set up is done, so let me know if you get it working.
No unfortunately not. Yesterday I completely restarted everything (setup new GCP VM instance, rasa init, new github repo, new facebook page etc…) and I am experiencing the exact same issue the second try. This time I started by setting up the Facebook page first and followed the Official Rasa Facebook Setup Documentation. Then, I followed the Rasa blog post The Complete Guide to Deploying Your Rasa Assistant. Same problem… I think this may be a FB issue. Work around solution? @mloubser
on your facebook page in the settings -> advanced messaging -> connected applications -> configure -> main receiver of the handover protocol
and select your facebook page, it worked for me doing that and apart from the messages it only works for me when testing it with the same administrator of the page since another user does not respond to me, it seems to me that when you publish it, it can only be used with other users
Hi jchek, thanks for your suggestion. I tried it out and still didnt get it to work. I read through the Rasa Facebook docs again and wasnt sure if I had to add the https://<yourdomain.com>/webhook/facebook/webhooks in the credentials.yml file at the bottom.
e.g. FB Messenger Documentation
" The endpoint for receiving Facebook messenger messages is http://localhost:5005/webhooks/facebook/webhook , replacing the host and port with the appropriate values. This is the URL you should add in the configuration of the webhook."
Does that mean I would put above in my credential.yml file?
" This entry is needed if you are using Rasa X. The entry represents credentials
for the Rasa X “channel”, i.e. Talk to your bot and Share with guest testers.
rasa: url: “https://<yourdomain.com>/webhooks/facebook/webhook”
I’m going to try one more time with the setup and set up my FB first with the advanced messenger setting you recommended. If I cant get it to work, would you be interested in helping me setup the FB messenger and get Rasa working for payment? @jchek11
Here is how my credential.yml is set. In my previous post… I am not sure if I change the Rasa: Url: to my webhook or keep it the same default http://localhost value??
# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels/
rest:
# you don't need to provide anything here - this channel doesn't
# require any credentials
facebook:
verify: "my-example"
secret: "d5616ser651dgExample651685168"
page-access-token: "DDFSA68516518Example681684serg"
#slack:
# slack_token: "<your slack token>"
# slack_channel: "<the slack channel>"
#socketio:
# user_message_evt: <event name for user message>
# bot_message_evt: <event name for but messages>
# session_persistence: <true/false>
#mattermost:
# url: "https://<mattermost instance>/api/v4"
# token: "<bot token>"
# webhook_url: "<callback URL>"
# This entry is needed if you are using Rasa X. The entry represents credentials
# for the Rasa X "channel", i.e. Talk to your bot and Share with guest testers.
rasa:
url: "https://bobrasa.dev/webhooks/facebook/webhook"
I will try the rasa run -m models --enable-api --cors “*” --debug command. My Rasa instance is running on a Google Cloud VM with ubuntu.You think it would work if I just type that command into the SSH terminal?
Also, I noticed that in your picture of the FB Developer panel… your icon for the FB Messenger product is green. My FB Messenger product is still white like it hasnt been set up. Even though I followed all the directions in the documentation and configured the advanced messenger steps like you mentioned. Did you submit your app for review to FB? I would pay you to help me set it up (paypal).
But it looks like you havent finish setting up your App on Facebook yet.
perhaps you wanna share more screenshots about your facebook (messenger, webhook) setup
@gaushh - No I wasnt able to solve the problem. I even had help with testing the setup and webhooks from one of Rasa’s employee. I was told that I should try to implement locally with Ngrok and see if I can figure out the problem.
Heres the acual error. Notice in the FB response the ‘text’ ‘not working’