I want to show a greeting message when start a conversation on Facebook Messenger ( before any user input ) . How to do it?
The problem is : My code is for server by NodeJS ,and it only trigger when a message is send to server ,which mean it only be triggered when users send something.
Facebook messenger doesn't send anything when you press button "Message".
I have check this link Messenger Greeting , but it only shows when a new user starts chat ,but i need show it when starting conversations
You have to set a welcome message, using the Facebook Api.
Find the documentation here: https://developers.facebook.com/docs/messenger-platform/implementation#welcome_screen
As explained in the documentation, you have to make a POST request to https://graph.facebook.com/v2.6/<PAGE_ID>/thread_settings?access_token=<PAGE_ACCESS_TOKEN>
You need to make the POST request only once, then Facebook will automatically prompt your welcome message whenever a user starts a chat.
I wrote and answer for this question here.
Have a nice working ;)
Related
How can a telegram bot open self bot chat without start command, in answerCallbackQuery method, responding to inline buttons?
This opens bot's chat, but appends "/start" into chat
https://t.me/<bot-name>?start=<start-parameter>
This one opens bot's chat without appending "/start". But seems to me more of a bug than a correct way.
https://t.me/<bot-name>?start=a:b
This other ones report URL_INVALID:
https://t.me/<bot-name>?start=
https://t.me/<bot-name>?start
https://t.me/<bot-name>?
https://t.me/<bot-name>
https://t.me/<bot-name>/
It is not possible to redirect to the bot's chat with a command rather than /start. The only 2 parameters that are accepted in the bot URL are:
start which is for starting the bot in private chat, and
startgroup which lets the user choose a group to start the bot in.
And there's something to be aware of: Their values will be appended after a space after the /start. For example if your URL is t.me/yourbot?start=a, your bot will get a message with the text /start a.
Is it possible to send a message from a node.js server to someone's mobile number or telegram Id directly?
is it possible without using a telegram bot?
I need an API like below:
function sendMessage(senderTelegramId, receiverTelegramId, messageText)
In short: No, without a bot no way for now.
Detailed explanation:
In order for you to send users messages on telegram you would need to create your own telegram bot. They have a well documented API which you can read and play around with.
There are 2 things you should know about sending messages to users using telegram bot:
You can't just send random people messages on telegram even if you know their phone number, to send them messages you need to have their chat_id. See how in the docs
To get the chat_id the user must first click the start button that comes up when they open your bot for the first time. Telegram will send you the chat id of that user and you save it for later when you would want to send messages to that user.
There are tons of libraries that makes working telegram bots very easy, it wouldn't take you more than an hour to get started.
I hope this answers the question, feel free to ask further questions, I have made some bots and you can also play around with them to see how it works.
Cheers )
There is actually one more easiest way to send a message to chat
just fetch the URL
https://api.telegram.org/bot[BOT_API_KEY]/sendMessage?chat_id=[MY_CHANNEL_NAME]&text=[MY_MESSAGE_TEXT]
you can find more details here
https://xabaras.medium.com/sending-a-message-to-a-telegram-channel-the-easy-way-eb0a0b32968
is there anyone out there who knows if it is possible to make your agent start a conversation with user without any code using Dialogflow(api.ai)?
You can do this by following this tutorial : https://miningbusinessdata.com/get-api-ai-agent-initiate-conversation-user-types-message/
Also some channels like messenger allow you to set a welcome message to initiate the conversation. (https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/get-started-button/)
I went thru all the documentation at: https://developers.facebook.com/docs/messenger-platform/quickstart and my fan page does not reply to when receiving a message conversation.
When I logged in and start conversation I get a notification on the fan page which says: Authentication successful, Sent by bot... So basically there seems that something is working... But when I type 'hello' nothing comes back from the fan page.
I dont know what I am missing, just so u know I am using this code from this repo: https://github.com/fbsamples/messenger-platform-samples/tree/master/node
So I need my Telegram bot to ask a question from user (send any message of any possible type) without any initiation from a user. Is it possible? I cant find anything about this.
If the user interacted with your bot before you just need to use their user_id and send your message. You can't however send message to a user who has never interacted with your bot.
Telegram BOT never can take an action before user interact with bot. because most of available method need "chat_id". if you dont have "chat_id", you can only run simple method like getMe, getUpdates,etc.