Facebook bot get rid of default message - facebook

I am following tutorial from https://github.com/jw84/messenger-bot-tutorial
I am getting this message "The Default answer block is your bot’s default response to any input from a user. Create messages in this block that will guide your users. You can add buttons that lead users to other blocks. Remember, you also can use “AI Setup” to choose what blocks to show based on users' input." everytime I write anything random in messenger

This response is generated automatically by chatfuel. Check to see if you have linked chatfuel to your bot. If you intentionally used chatfuel you can change its default response from the dashboard. If you were like me, I setup chatfuel initially but decided it wasn't robust enough for what I wanted to do, and then I used Howdy botkit, but the chatfuel ai was still linked so I got the chatfuel default message + howdy botkit responses. I had to delete the chatfuel link so that I could only get responses from Howdy.

Related

Can't get Google Chat messages with Gmail API

What are the details of your problem?
Until recently, in my own web application, I used the Gmail API to retrieve Google Chat messages as follows.
I was able to get it from "Label: CHAT" by executing as follows.
(1) Acquisition of thread ID belonging to CHAT label
https://gmail.googleapis.com/gmail/v1/users/me/messages?labelIds=CHAT
(2) Get message information from thread ID
https://gmail.googleapis.com/gmail/v1/users/me/threads/[Thread ID]
However, it seems that it has been impossible to obtain it since around December 2022, and when I searched for "in: chats" in Gmail, the messages after December 10th were not displayed.
Any method is fine, so I would like to be able to get Google Chat messages as before.
Anyone know the cause and solution?
Please check.
I also tried using the Google Chat API to see if it was possible to get messages, but I could only get messages in the space, and I couldn't get direct messages, so I wasn't able to use it.
I checked all the messages in the labels that can be obtained at "https://gmail.googleapis.com/gmail/v1/users/me/labels", but it seems that chat messages are not included.
Also, in another answer, there was a description that the state included in the Gmail API was a bug, so it is possible that this bug was adapted and it was not displayed, but in that case, there is another way to deal with it. Are you there?
Access CHATS label with Gmail API

Facebook Graph API pre-defined messages, but with the ability to edit

I am currently building a site for a University study that aims to encourage a select few young people (peer supporters) to share messages around health and wellbeing in a private Facebook group.
I have used the Feed/Share dialog to share relevant links/images, however there are a few bits of content that are just pure text. I am aware that Facebook allows to post a status to a group using the Graph API, however you are not allowed to pre-fill what a user is going to say.
Would it be possible to have the ability to generate the content in a text box allowing the users to edit it as they wish before posting to the group or is this still prohibited?
...allowing the users to edit it as they wish...
No, that is not allowed, it´s prefilling. You would only be allowed to present an EMPTY textbox, where users can write the message. The message always must be 100% user generated.

Facebook Messenger Bot - How to disable bot and allow human to chat

so this is something I've been trying to think through for about 16 hours. I am coding with PHP / CuRl / etc - the bot works and everything is fine. My current issue is figuring out how to disable the bot and allow a human to begin chatting with the customer/sender.
Has anyone successfully, created a route for this ? I mean it's pretty hard from what I see, you'd have to disable etc etc. A lot of effort for my clients.
Thanks for any input.
Facebook has rolled out a "Handover Protocol" which is supposed to facilitate a combined human/bot Messenger implementation.
https://developers.facebook.com/docs/messenger-platform/handover-protocol
It is a little unclear what actually occurs in step 5:
Pass thread control: At some point in the conversation, a user may choose to do something like interact with a live agent. To handle this, pass thread control from the Primary Receiver to the Secondary Receiver. The Secondary Receiver will receive a messaging_handovers webhook event to notify it that is now controls the conversation.
This doesn't actually disable the bot (as the OP requested), and isn't in the control of the Page owner but rather of the user. It seems FB envisions the user typing something like 'I would like to chat with a human' triggering the bot to pass control...but it would be nice to let the page owner simply put the app in standby and handle the messages herself.
Once you recognize someone wants to speak to a human, set a flag that disables all actions of your bot to on.
Then, have your bot message you, or whoever will respond, that a user ID needs responding to. Have your bot continue to send all messages received from them back to you until you enable the bot again.
Create some sort of way for your bot to interact with you that allows you to send a message to a specific user, and a way to once again enable the bot interaction with the user.
Probably something like "sendMessage104012301230'Hi, sorry you couldn't find [etc]', and enableUser104012301230
There may be a better way, but those are some thoughts on how I'd do it
If you enable messages echo, whenever a human respond using the page, a echo post is sent, and inside entry->messaging->message there's no app_id.
You can use that information to disable bot replies for a certain period, or disable indefinitely until you enabled is with some admin command (that's how I'm doing)
I thought a solution could be to label the message as "unsolved". Another solution could be to have the bot mark the conversation as unread. Does anyone know if it is possibile to add a label to a conversation or mark as unread through API?

Monitoring new likes and automatically sending a private message

I would need to write a script in order to automate this task:
Monitor new likes on a Facebook Page periodically.
When a new like is detected, identify the person who gave it
Send them a private message, thanking them and pointing them to additional resources that may be of their interest.
Would this be feasible using the Facebook API? The documentation strikes me as a little unwelcoming for the casual observer, and I'm not sure whether this is impossible or it's just that I haven't dived deep enough. Are the three steps above doable using the API?
You can use a cron job to get the number of likes of a Page with the /page-id endpoint.
You can´t get the fans of a Page with the API, and you can´t get the "last liker" either.
Auto-sending and message prefilling is not allowed (it would be spam anyway), and you can only reply to use messages as a Page. You can´t initiate a conversation.

Facebook "pre-filling" policy unclear with regards to empty message and the link parameter

I'm trying to get publish_actions permissions approved for an iPhone app and been denied twice. The first time was because, as the policy says not to, we were populating the message parameter automatically when posting to the user's wall using the graph api. So we removed the message field entirely and kept only the link parameter.
The app was rejected again with the same message so I figured I'd try to get a definitive answer here before I get three strikes on app submission.
Both the 2.3 platform policy video and written policy explicitly say do not pre-fill the message parameter but say nothing about the link parameter. Beyond simply not pre-filling any of the message parameter must we also provide a way for the user to enter a message? If so that is not clear in the policy.
Graph Api Publish Documentation:
https://developers.facebook.com/docs/graph-api/reference/v2.1/user/feed#publish
"Pre-fill" Video: https://developers.facebook.com/docs/apps/review/prefill
I was rejected three times with the same response - which was you can not pre-populate the message field. But with the second and third submission, I was not pre-populating the message field. Of course I was expecting the Facebook reviewer to operate the application according to my instructions to see this. They don't, and the refusal was because they could not tell from my submission that this was the case. The response they give is not hand typed, but a stamped response given when they click "REFUSE!".
The solution is not only to get the application to behave according to policy, but to provide clear pictures with the step by step instructions of how your application shows the user the post, allows for the user to input a message, and the finished post on his time line.