Error in subscribing to webhook message in messenger setting - facebook

Currently, my facebook develop app has basic permissions to reply to comments (pages_manage_engagement) or to text (pages_messaging). However, I have a problem when subscribing to webhook messages, where messages get unsubscribed after 1-2 minutes. Will I have a problem or is my app missing some permissions?
Thank for help.
I tried subscribing directly on my app in the FB develop web, and tried running the api https://graph.facebook.com/v2.8/{{page_id}}/subscribed_apps?access_token={{access_token}} with subscribed_fields=feed, mention, name, picture, category, description, conversations, messages, it just got me I can receive messages from messenger for 1-2', then I can't receive anymore.

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.

Simple app sending "Hello world!" to facebook messenger group

I'm trying to create simple aplication that will send me messege every day for example it can be "Hello world!". Is it even possible for facebook messenger extension to send message without being called? Where should I start? I mentioning about messenger extension because I would like this app to send message to group chat.
To sum up the comments: You can only send messages from pages to users (who contacted the Page first). There is no other API for user to user communication, or for communication in groups.

How to open chatbot on webhook feed event

I subscribed my webhook to the 'feed' events, however. Is there any way to open the chatbot to the user that comments or do anything on the page?
Bearing in mind that I need to have a app scoped fb_id for that user to send messages to them.
Thanks.
Got it!
You can't exactly open the chatbot itself after a comment or post etc. What you can do is to POST"private_reply" to the user, then your chatbot webhook can monitor for any further messages.
To do so, you can use the following endpoint: https://developers.facebook.com/docs/graph-api/reference/v2.12/object/private_replies

Facebook Page Messenger not working with Webhook API

I followed the steps to setup the Facebook Messenger platform. I have successfully setup the webhook, I receive messages on my webhook.
For webhooks to work, I obviously had to subscribe my page, see the screenshot.
Now the strange problem is, if I keep my page subscribed to a webhook, my facebook page messenger doesn't show any thing.
As soon as I unsubscribe my page for webhook, page messenger nicely loads.
What can I do ?
I just checked mine and it is not working, which it was yesterday, so I'm confident this is a bug.
I'd suggest opening a bug report, and in the meantime, you can download the pages for messenger app Facebook makes to access the messages while waiting for a fix.

Facebook Messenger Bot Daily Push Notification, How?

In cnn fb messenger bot if i write subscribe they show a message like "Got it. I’ll send you top stories every day." and then they daily send me top stories at fixed time. How they do it? I created an fb bot for my site without this but i can't understand how i add this. can anyone tell me basic instruction for this?
The idea is simple. When you send "subscribe" to the bot, the bot server would add a record according to the sender_id to their database or memory , then the bot server could set a timer to distribute the news messages to those sender_id who have subscribed for the news.