I am new to facebook messenger(Webhook). I am using Nodejs and Heroku for sending bot message.
My requirement is to send message to all inactive player at once via
Page Access Token.
Is there a way achieve this. Or/ Is there any alternative way.
Thanks
Related
So I'm tryin to get messages via messenger webhook. It is working well locally but when I try to send a message through messenger the callback(which is Heroku) isn't happening.
I was sending the messages with an account which had no role in the app and which was also a developer account which had Admin role.
I have subscribed to messages, messaging_postbacks, message_deliveries, message_reads, message_echoes, standby events for my webhook and added my page to it. I dont necessarily think im missing anything.
...a little help Captain??
Edit: I am now obtaining messages sent by clicking test button, but not when other developer accounts sent message through messenger
I followed this twilio tutorial on how to set up facebook messenger. However this bot only triggers my webhook when I send a message to it on my facebook profile. The webhook I set up isn't called at all when any other facebook user sends a message to my bot.
I've tried getting the other user to follow and like the bot's page and also getting the bot to reply back. It seems only messages from my facebook profile to the bot triggers the call to my webhook. how can I fix this?
You can fix it by submitting your app for review.
Before you do that, it will only work for user accounts that have a role in the app.
https://developers.facebook.com/docs/messenger-platform/submission-process and https://developers.facebook.com/docs/app-review
provide more detailed information on the whole process.
I'm developing a facebook/workplace chatbot using dialogflow with node.js for fulfillment. Can't seem to find resources for pushing notifications.
I want to be able to trigger sending the message by visiting the webhook url.
You need to use the Facebook Graph APIs to send a facebook notification to a specific user. User can click on the notification to launch the facebook messenger chatbot.
Here is a quick example.
https://graph.facebook.com/v3.0/{user_id}/notifications?template={your_message}&href={link}&access_token={page_access_token}
You can read more about it here: https://developers.facebook.com/docs/graph-api/reference/user/notifications/
Basically, you need to run a web service which when called makes the calls to the facebook notification APIs.
All you need to do is pass the user id, the message/link to be displayed in the notification and the page access token.
When someone first sends you a message via Facebook, Facebook provides you the page-specific user id which you can store in the database.
Page access token can be accessed by going to https://developers.facebook.com/apps
What is the difference between incoming webhook and slack chat.postMessage webAPI?
When should we use one over another? I have a slack app, I want to send messages to particular channel as a User. I found an option to post message as a User in chat.postMessage, can I achieve this by incoming webhook?
To your specific question. Its technically possible to send messages on behalf of a user with chat.postMessage by using a token from that user and setting as_user to true.
For example if you installed a Slack app the created app token will be linked to the installing user and you can use it send messages on behalf of the installing user.
I created a Facebook chatbot to send poactivate message based on this sample https://github.com/Microsoft/BotBuilder-Samples/tree/master/Node/core-proactiveMessages. But I found it only works with the latest user interact with the Bot via Facebook Messager. I want to send the message to all users who have been interactive with bot. Any suggestions?