Facebook Messenger bot not posting to webhook - facebook-messenger

I have been building a Facebook Messenger bot and am having trouble receiving messages from Messenger at the webhook on my server. I've been working with the Send API & Webhooks for several weeks and have had no trouble sending messages back and forth to a user until today. I am able to validate the webhook from the Facebook Developer Console, and I can see the validation coming through on a GET call to my /webhook route. However, when I message my bot (which should POST to /webhook) from my personal account, I don't see any of the message data being forwarded to my server. The route never gets hit. The page I'm sending to is subscribed to the app in the Facebook Developer Console. What's strange is that I can manually hit /webhook with a message using curl:
curl -i -X POST -H 'Content-Type: application/json' -d
'{"object":"page","entry":
[{"id":43674671559,"time":1460620433256,"messaging":[{"sender":
{"id":MY_ACTUAL_FACEBOOK_USER_ID},"recipient":
{"id":MY_PAGE_ID},"timestamp":1460620433123,"message":{"mid":"mid.1460620432888:f8e3412003d2d1cd93","seq":12604,"text":"Testing
Chat Bot .."}}]}]}' "https://XXXXX.ngrok.io/webhook"
I'm using ngrok to forward calls to my localhost. The above curl command works fine, meaning I can see the message delivered on my server at /webhook. To me this suggests the problem is coming from Facebook, which would mean it's out of my control. Is there anything I've missed? What else could I check, and why would this be failing silently?

The problem as described above is most likely in Messenger -> settings -> webhooks window where in the bottom you have to select a Page to subscribe to the application (webhook).
Also, sometimes if you send messages and the webhook is offline, it takes couple of minutes for all the messages to come through.

Related

Last Message Sent by User Messenger Bot

I'm working with Facebook Messenger Bots and I need a way to make an HTTP Request for the last message sent by the user. All I can find is that Messenger Bots send a web hook with the information but, I specifically need to be able to manually check for the last message sent by the user. Any input would be helpful. Thank you.

Facebook Messenger Bot cannot send message to a given ID not working

I want to send message to a user any time using facebook messenger API.
I'm using developer version of messaging app and has not submitted for review yet.
We are two friends both as developer in the app. I want when my friend sends message to my page, Bot replies and a copy of message sent by friend comes to my inbox. But when I tried api throws following error.
{"error":{"message":"(#100) Parameter error: You cannot send messages to this id","type":"OAuthException","code":100,"fbtrace_id":"HRTLdvidA4u"}}
Is there any solution.
Thanks.

Strange message from facebook messenger api

For some reason I receive message from facebook page (with connected bot):
"Thanks for messaging us. We try to be as responsive as possible. We'll get back to you soon."
But in bot app there is no such phrase.
Whether he can send a facebook message under some conditions (such as long response from webhook)?
I'm guesssing it's an old auto response setting for that page.
Go into settings and under Response Assistant, set both of these to No:
Stay responsive when you can't get to your computer or phone
Send Instant Replies to anyone who messages your Page

Failed to Send error when sharing notes and pics

I have a mirror-api application i'm writing that takes notes, pictures and video from the users timeline and stores them. For some reason every note and picture I take and send to a contact i inserted through mirror has "Failed to Send" posted on the timeline card in glass. The app however still receives the timeline item. Anyone else having this issue?
You need to setup the timeline subscription (https://developers.google.com/glass/v1/reference/subscriptions/insert) with "UPDATE" item included in the "operation" list.
Mirror API will sending POST queries with the shared card info to your callbackURL endpoint. Accordingly your service should return HTTP Status 200 in response.
The endpoint should have HTTPS connection. To solve this - use ngrok (https://ngrok.com/) if you're developing on localhost or Google's subscription proxy (just google it, i can post more than 2 links now)

About google app gmail api

I was trying to send emails to my client from my application after few sent mails all mails bounces back with a message saying "You have reached a limit for sending mail. Your message was not sent." And one more thing when i see my developer console gmail api it still showing 0% usage.what is this issue? is this a bug or something else?
There's an extra limit on sending because it's a vector for abuse--it doesn't show up in the developers console but it's the same as sending via SMTP or the web interface.
This seems to have a good overview:
http://www.labnol.org/internet/email/gmail-daily-limit-sending-bulk-email/2191/

Resources