Botframework-sdk: [Support] Facebook Messenger Bot: No replies

Created on 1 May 2016  Â·  30Comments  Â·  Source: microsoft/botframework-sdk

My Bot ID: cassiebot

I just connected the Facebook Messenger channel. Looks good: "Credentials have been validated." I do not see a test link however in the overview.

When I try to chat with the bot on Facebook, I see a green connected icon, but the bot does not reply at all...

cassiebot fbm

Ideas:

  • Facebook App has not been reviewed
  • pages_messaging Permission for App Review is not set in Facebook. Do I need it?
  • Slack and Webchat do work for the bot, while Skype does also not reply...
  • I did not update the bot - just added a new channel

Thank you very much for your great support so far.

Most helpful comment

Yes, only admin/developer/test accounts can be used until the app is approved.

You can add accounts in the "Roles" tab of the FB developer portal. https://developers.facebook.com/apps/[yourappid]/roles/

All 30 comments

It does not need to be published

Sent from my tumbs


From: Federico Ellesmailto:[email protected]
Sent: ‎5/‎1/‎2016 12:43 AM
To: Microsoft/BotBuildermailto:[email protected]
Subject: [Microsoft/BotBuilder] [Support] Facebook Messenger Bot: No replies (#204)

My Bot ID: cassiebot

I just connected the Facebook Messenger channel. Looks good: "Credentials have been validated." I do not see a test link however in the overview.

When I try to chat with the bot on Facebook, I see a green connected icon, but the bot does not reply at all...

[cassiebot fbm]https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fcloud.githubusercontent.com%2fassets%2f1033020%2f14940667%2f029e05b0-0f80-11e6-97eb-ccef3861f1b2.png&data=01%7c01%7cTom.Laird-McConnell%40microsoft.com%7c4944e55cc8f64722764808d37194558d%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=v3noMbWe6opw3IdoiPNjrBNVPxUp4Qs29bwxnwVztI4%3d

Ideas:

  • Facebook App has not been reviewed
  • pages_messaging Permission for App Review is not set in Facebook. Do I need it?
  • Slack and Webchat do work for the bot, while Skype does also not reply...
  • I did not update the bot - just added a new channel

Thank you very much for your great support so far.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/BotBuilder/issues/204

I'm having the same issue. If I create a webhook URL that points directly to my site, I get callbacks from FB. But using the webhook path from the botframework channel config

https://facebook.botframework.com/api/v1/bots/[BotName], 

nothing reaches me.

Hmm..I'm not certain why this isn't working. My only advice would go through the registration process again.

Making a GET request to the URL (https://facebook.botframework.com/api/v1/bots/[BotName],) with the hub.verify_token and a hub.challenge gets a valid response. But POST to the same URL with FB request json returns a 200 but no content.

Further, inputting malformed JSON, or JSON that doesn't conform FB's schema returns various errors as expected, so clearly it is handling the data. But somewhere in the code it is failing to forward the request on to my app (hosted on Azure) or forwarding to a URL / signature that isn't hitting the correct API. In any case, the debugger never gets hit though I can trigger the debugger from a local request.

This is compliant with the facebook documentation.

Yes, is there something you expect to happen differently?

From: Gene Reddick [mailto:[email protected]]
Sent: Monday, May 2, 2016 4:32 PM
To: Microsoft/BotBuilder [email protected]
Cc: Tom Laird-McConnell Tom.[email protected]; Comment [email protected]
Subject: Re: [Microsoft/BotBuilder] [Support] Facebook Messenger Bot: No replies (#204)

Making a GET request to the URL (https://facebook.botframework.com/api/v1/bots/[BotName],https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2ffacebook.botframework.com%2fapi%2fv1%2fbots%2f%255BBotName%255D%2c&data=01%7c01%7cTom.Laird-McConnell%40microsoft.com%7ca0890d0bb95e46b70a4d08d372e2010f%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=GuZ9G%2fleH9v%2fK8klShzwG6Fl0Hkfjxv%2bKGlrW%2bzzLnM%3d) with the hub.verify_token and a hub.challenge gets a valid response. But POST to the same URL with FB request json returns a 200 but no content.

—
You are receiving this because you commented.
Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/BotBuilder/issues/204#issuecomment-216395290

OK, so I guess the empty response content is expected. But, my expectation, mistaken perhaps, is that a call to the facebook.botframework.com URL would take the FB request object, convert it into a botframework object and forward it to the api/messages URL associated with my app. My app would respond with some content and that message would then be forwarded on the FB API to update the messenger client.

However, in my case, a valid FB request object sent to facebook.botframework.com does not trigger a request to my API -- the debugger is never hit although I can trigger the break point using the webchat version -- and does not post to FB messenger.

OK, fixed. My problem was an incorrect "Facebook Page Id".

Thanks!

Same here. Facebook Page Id was wrong. Issue can be closed!

Yeah, my alter ego confirmed that it does work now. Can be closed. Thanks @genereddick for sharing your solution.

hi ,
i have issue with facebook bot,

when i use my own account , i can get reponse and receive message to my webhook.

but when i send message from an other user account , i got nothing.

is the app should be published and accepted by facebook to have access from all other users?

many thanks

Yes, only admin/developer/test accounts can be used until the app is approved.

You can add accounts in the "Roles" tab of the FB developer portal. https://developers.facebook.com/apps/[yourappid]/roles/

@genereddick I have the same issue, please how my bot can be approved ?

@genereddick I submitted my bot Facebook App for approval but the human approving it is testing the bot using an account that is not admin/developer/test and thus the bot did not work, and the submission was rejected. How to get around this catch 22?

Hi @devonho,
I also submitted my bot for the approval and I noticed that some accounts has tested my bot even I don't added them as testers or developers, so I think that FB engineers are able to test the bot even they aren't testers (or developer) for a specific bot.

@devonho As I recall, they were able to test my account without issue, so I'm sure @saibimajdi is correct. Assuming you are able to test your own bot without any problems, did they give any feedback on issues they found (either on the page below or via email)?

https://developers.facebook.com/docs/messenger-platform/app-review

@genereddick @saibimajdi Thanks for your replies. This is reassuring; at least now I know that the FB tester accounts are not bound by the same rules. I am suspecting now that my Bot "didn't work" because the Azure webapp hosting my bot is slow to respond. It is in the free tier and doesn't have the "always on" feature.

I'm having problems when try SendToConversation, there is not error, but the messages is no delivered. How can I solve this?

//var connector = new ConnectorClient(new Uri("https://facebook.botframework.com"));
 var connector = new ConnectorClient(new Uri("https://api.botframework.com"));

Help me please.

I am still having this problem, verified "Facebook Page Id", APP id, app secret, page access token . All are correct. unregistered and reregisterd as well.
It seems to be woking fine from bots emulator on https://dev.botframework.com/bots?id=botname
page but not from messenger, "message us" opens the right page for chat as well.
I am not sure what else I am missing.

Found my issue, I was using wrong Callback URL and the Verify Token. Callback URL and Verify Token has to be ones provided by microsoft.
My bot had earlier authenticated using a different Callback URL and Verify Token which were directly hitting my server.

Hi,

I am facing the same issue. Verified Facebook Page Id, App ID, App secret, page access token. All are correct. Registered and unregistered and tried as well.
The bot seems to work fine on webchat channel as well as the emulator.
When I click on "Message Us" from the bot framework dev page, it opens up the right chat. Still when I type in something the bot doesn't respond.
I have verified the Callback URL and Verify token as well and they are correct too. The errors on the bots page do not seem to update properly as soon as we try but this is the error for one of my previous trials - "There was an error sending this message to your bot: HTTP status code InternalServerError"

Note - This bot was working fine till yesterday. I made a few changes to the bot and redeployed and doesn't seem to work ever since. Assumed it might be due to my changes and reverted them and even then the same problem. I am using the C# SDK Bot Builder v 3.5.2
Any help or any guidance to debug is much appreciated!! Seem to have been stuck and not sure what else to do :-(

Thanks,
Anitha

Adding to my question above, as I was unable to edit it - I get the same error above mentioned when I enable my bot in Skype too. Not sure what went wrong. My bot ID is anithas_test_bot

Please help!

Hi,

I submitted a bot for approval under pages_messaging and pages_messaging_subscriptions. The first was approved the second was not. After reviewing the feedback I realized I don't need pages_messaging_subscriptions and so I removed it from the submission. I don't get an option to resubmit with this item removed or anything. Should my bot be available publicly now? Right now my only my tester account can interact with it. Any message from the outside is still ignored as if it were still in the submission process. Is this normal or am I missing something?

I was indeed missing something obvious. I never took the app live.

@lfiedlerc, if you can't find the re-submit option, maybe you should create another app and submit it!

I want to register Subscription Messaging (pages_messaging_subscriptions) for my BOT (It kind of service permit operator can send message to their registered subscriber). I tried 3 times with use cases (News, Productivity, Personal Tracking) but it's failed. My BOT can only send message to registered subscribers via Facebook messenger within 24 hours. Please help me! Thanks

Hi!!
I am using ngrok from facebook callback for developement.
Every time ngrok goes out it's necesary tu put new ngrok address on the facebook webhook config. But then facebook does not send the events so easily.
Some time facebook response after a large time (10 min) and if it there is no response then i remove the subscrition and send a new one, and if not answer i have to create a new fb application, some times this doesn't work either.
I didn't found any log on facebook to see why callback it's not reaching the bot.
Questions:
Its there some issue related to facebook response time after some change on callbacks?
What am i doing wrong?.
Thanks

Hello;

I have the same issue. When I use my own account, or any account that I added to my app as e Tester. My chatbot works well.
else, It doesn't repond. How can I fix this problem?

Should I create a webpage that hostes The privacy URL, or there is any solution ?

Thxs

@dihiaselma has you bot been submitted and approved by facebook?

I experienced the same issue. It turned out the facebook page was registered on two facebook apps so I deleted one of the apps and that solved the problem for me.

@JasonSowers No, I didn't submit it. How to do that? please help me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

somprabhsharma picture somprabhsharma  Â·  3Comments

hailiang-wang picture hailiang-wang  Â·  3Comments

arpan14 picture arpan14  Â·  3Comments

mattlanham picture mattlanham  Â·  3Comments

Vigneshramkumar picture Vigneshramkumar  Â·  3Comments