How to reset unread_count on Facebook Messenger API? - facebook

So I created a ChatBot with Messenger API and I get the messages that has been sent to the Facebook Pages. I also get the unread_messages which is from "unread_count" but I couldn't find how to update the unread_count for each conversation. There is no answer for that in the docs.
It doesn't go away when i send message from my chat. It only goes 0 when I manually login to https://business.facebook.com/ and click the chat.
There is a "sender_action" parameter which has "mark_seen" indicator but it is only for visual seen. It doesn't do anything on the unread_count.
Do I have to handle this on my backend or Facebook API has the solution?

Related

Facebook message to page

Is there a way how I can send regular message to facebook page?
I got this:
https://github.com/Schmavery/facebook-chat-api
but it is unofficial.
When I've tried to send several messages sending account was blocked.
I have not found any info about limits or anything else connected to sending messages to Facebook pages.
In official Facebook documentation regarding messaging API there is nothing about sending message to Page. As bot is acting as Facebook Page itself I suppose it can't send message to another Facebook Page.
There is no API to send user to page messages, you can only send messages from page to user. And only if the receiver started the conversation first.
DonĀ“t use unofficial ways, they are not allowed.

Facebook Bot: Message Mentioner

I'm trying to build a bot that would message anyone who mentions (#PageName) it. I have set up the mention webhook for my bot so that whenever anyone mentions my page in a comment or post, I receive a notification. Unfortunately, Facebook doesn't make it easy to message the person who mentioned my page, since there are different page IDs and messenger IDs. I am able to fetch the user ID from the mention by fetching the from field from the graph API, but is it possible to convert this user ID to a messenger ID so that I may actually message the user?

How can I show a dynamic welcome message using Amazon lex bot?

I am developing a chatbot using Amazon lex. It is going to be integrated with facebook messenger in a facebook page. When a user opens the bot for the first time, it says nothing. It listens to user intents. I would like the bot to initiate a conversation and provide the user with a few options(configured in a mysql database in the backend). What is the best way to do this?
There is a get_started event which you can subscribe to with FB Messenger
See the Docs
When triggered, hit your db to get whatever response is appropriate based on the context you have from the event, and anything in your DB.

Get list of users who contacted my Facebook Messenger Page

I am building a Chat Bot using Facebook Messenger Platform.
According to Facebook documentation, all users who previously contacted my page via Messenger chat can be contacted using the bot.
My question is: is there a way to retrieve the list of user ids who previously contacted my page on Messenger, previous to the bot being enabled on the page?
My intention is to engage them and let them know that they can use the bot now.
Thanks.

FB chat bot Permission to make hybrid bot so human can reply from web panel

I have developed FB messenger bot using Microsoft bot framework. The bot is ready and approved by FB.
Now I am working on the hybrid part so human(web panel user) can take over chat and do conversation.
Now Issue is, I don't now which permissions need to read and show bot conversation in my web panel.
Also, it will be great if you can suggest that should I need to save conversation in DB to show in web panel or Is it possible that I can make a direct get request to FB API and show.
Thanks.
For FB Permission: pages_messaging
Development:
Show message: From our database.
Reply message: Using botframework