Redirect to page admin if chatbot turned off - facebook-messenger

I have created chatbot for messenger and now i want to add function when user unsubscribes chatbot then it must send all messages to page with notification. I thought to create table where i will save users who unsubscribed and everytime check if user unsubscribed or not. When unsubscribed then just return 200. But it doesn't send notification to facebook page.

You can use the handover protocol to pass control of the chat to the page inbox for unsubscribed users.
https://developers.facebook.com/docs/messenger-platform/handover-protocol

Related

React confirm email with request from API

I'm stuck with a problem.
Any user that create an account get an email (sent from backend) with a link confirmation.
When the user click that link, it send a request type:
{
"confirm_link": "/auth/confirm/id/emailtype/****token****"
}
My problem is: How do I check in my front if the user has clicked so I can be able to display a simple react toast like 'Your account as been verified' ?
Thank you !
Once the email confirmation request is completed you can use websockets to send a message from server to client notifying that account is verified.you can display your toast

Gmail API PubSub Push Endpoint is triggered twice

We have integrated Gmail API into our app to get the email inbox updates of Gmail accounts. We have used Gmail watch API to start listening to the updates of the Gmail inbox of a user. We have added a subscription and mentioned the endpoint of our app, Topic-Subscription details screenshot attached below, where we are ready to receive inbox updates.
But there are some Gmail accounts, whenever an email is received on those accounts then our "push endpoint" is triggered twice instead of once. That's causing a problem within our app.
Can you please explain that is it possible that a push endpoint can be triggered multiple times, on a single email received at the Gmail inbox?

How to enable/disable chatbot from Facebook Messenger

I have successfully built a chatbot rasa app to connect with Facebook Messenger. The bot is responsible for replying user's message instead of the admin page. I want something more flexible. Users can enable/disable chatbot. When users disabled chatbot they will chat with the admin page instead (The bot will not listen until it is turned on again)
Is there a way to do this?
To pause the conversation with the bot, if the user asks to be handed off to a human, you can write a rule that executes a custom action when that intent is triggered, which returns a ConversationPaused event. That way the bot stops listening to the user, and a person from your admin page can reply. There is a ConversationResumed event in that link which you can use to resume the conversation with the bot again.

Messenger ref parameter is not passed to dialogflow

I'm trying to connect messenger bot and dialogflow.
The idea is - when you click on the button, service is redirecting you to the me link
(example: http://m.me/2010070995927131?ref=initial_message_with_param)
then dialoglflow receives initial_message_with_param as message and fullfilment can generate the response.
Sending messages works at all but unfortunately, ref param doesn't.
Do you have any ideas why ref param is ignored on Dialogflow side?
Been few months, but i just came across here.
Under the "Edit Page Subscription Fields" in Messaging > Webhook in Facebook developers, you need to enable messaging_referrals to receive referral payload calls.

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

Resources