-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Facebook bots cannot handle location data #337
Comments
Which botkit version are you using? |
I'm running Botkit 0.2.2 as well. I'm still not getting a |
Are you getting any other facebook_events or is just the location the problem? |
The webhook isn't getting caught. On normal text messages I get this:
But for a location message, I only get this:
I also get |
I actually meant the "GOT A MESSAGE HOOK" message :) (Maybe I'm missing something simpler... if that's the case, sorry in advance... or in retrospect... or something :) ) |
@SHBelsky has there been any movement on your end with reference to this bug? I'm experiencing a similar problem and am considering taking @shirilad's advice and debugging my way through the facebook.js file. Just wanted to first know if you'd found a workaround or not |
I wasn't able to quite debug the problem. It doesn't seem like anything should be stopping the attachments from coming in, but that still seems to happen. Using the routes provided in |
@SHBelsky Are you using some kind of middleware? I was using howdyai's botkit-middleware-witai, and it turned out this was where the problem was. I submitted a pull request for it here howdyai/botkit-middleware-witai#13 |
In my case the message hook is being triggered. However, since there is no message.text none of my listeners fire. Even the pattern /^.*$/ doesn't yield any results. My hack solution was to detect a location response and set the message.text to 'LOCATION_QUERY'. Is there any other way to listen for FB attachments? I am on 0.2.2 and I'm not using the witai middleware. |
Changing this to a feature request. |
Just in case this is useful to someone, here is how I handled the location:
Also sending a location quick reply requires to desactivate the |
Time to close this? |
Will close for now! |
When trying to use a Facebook bot and sending location data through Messenger (iOS/Android), the
message_received
event isn't being fired, so the controller can't handle the location data at all. I don't know what event I should use instead, nor do I know if there is a simpler way of trying to extract the location data through Botkit at all.I'm definitely getting a POST request to my server and there aren't any discernible errors or bugs that I can identify. By temporarily overriding the POST request and logging the output, the location is definitely there, but then I would need to manually trigger the
message_received
event. I'd like to retain usage of thecreateWebhookEndpoints
function and have Botkit construct the routes for me, versus needing to manually construct the routes and event listeners.The text was updated successfully, but these errors were encountered: