facebook-messenger: messaging_optins webhook event not working for messenger
Hi, I’m trying to get the event when the developer/tester/admin click on the messenger plugin to start chat chat these are the selected event with my app:
Selected events: messages, messaging_postbacks, messaging_optins
from these 3 events, two are working perfectly. but messaging_optins isn’t working.
https://developers.facebook.com/docs/messenger-platform/reference/webhook-events/messaging_optins
from that link above it is mentioned:
This callback will occur when the send to Messenger plugin has been tapped, a user has accepted a message request using customer matching, or a user has opted in to receive messages via the checkbox plugin.
I’m tapping on the start chat button with different developer account. but everytime it fails to send me the webhook for this.
Can you guys please help me on that?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 40 (16 by maintainers)
Hi all,
After change my role or change the mode to live mod. It works 😄
The initial issue was for the webhook that happens after
MessengerCheckboxUserConfirmation. So that is different from what you are now seeing.Your app needs to send that
MessengerCheckboxUserConfirmationto Facebook, or else you’ll never get any other webhook related to that user.user_ref(unique per user, per page load)facebook-messenger-checkboxelement on the page, with the user_ref, and other attributes filled infacebook-messenger-checkboxMessengerCheckboxUserConfirmation.messaging_optinswebhook, passing you the user_ref, ref, etc, as part of the webhook payload.Yes, kind of. We have multiple users on our site, and each one has a different Facebook account, and Facebook Pages through our SINGLE Facebook app.
Oddly enough, my own personal account and FB pages do not seem to send the
messaging_optinwebhooks anymore to our app server. It is not clear why Facebook is no longer sending optins that should fire due to my FB account clicking a FB Checkbox on a page, but, I’m one of the 10% of users where themessaging_optinwebhooks simply does not arrive anymore. Prior to about November 2018, I did not have this issue at all, and it seemed like we received 100% of the webhooks we expected. But, we did not have our own analytics tracking setup at the time, so I cannot be certain about the percentage of “successful” webhooks then. We only recently added analytic tracking of our own that tracks when the FB Messaging Checkbox is checked, and then when we receive a webhook for the checkbox.I hope that is somewhat helpful.
In our case, it was our fault. My colleague says it was something like a combined problem caused by ngrok and
await importin React.Thank you very much for sharing your experience @cfurrow ! I think we managed to find the cause earlier by your knowledge.
We don’t suffer from this issue #227 now, but I think we might in the future, like after we start testing with more variation of FB account. In that case, we will report about our case here, hoping that helps this issue fixed.
It does seem to work for most people. In our own testing/analytics, we see that the percentage of FB Messenger Checkbox checked vs the
messaging_optinreceived from Facebook is over 90%. Meaning that 90% of the time, if a user checks the Facebook Messenger Checkbox and submits a form on the page, we receive amessaging_optinwebhook from Facebook like we expect. The other 10% of the time something went wrong, and we are still investigating whether it’s on our side, or FB.But, since there is that outstanding Facebook bug around the
messaging_optinwebhook, it could be on their side, but they have not identified the issue yet, but have added more logging on their end.