I am trying to setup my first Facebook bot by following this sample project in Glitch, connected to this quick start help page.
I have logged in with a real user, then created an app and added a messenger product as per the instructions. I have set the webhook, I have also created a page with this user, and subscribed the messenger bot to it using the app dashboard.
I can access the page with the real user and I can send messages to the page and the bot responds to those messages as expected. So far so good.
Now I would like to create test users, so that I can access this page and send messages with other users. I have followed the procedure indicated here to create such test users.
The problem is that those test users can't access the page: "Sorry, this content isn't available right now"
I have found this and this answers, which both point to this explanation.
Basically, the page the bot subscribes to must be created by one of the test users with manage_pages
and pages_messaging
permissions. Like this I can create other test users which can connect to the test page and send messages just fine. However, the bot is not properly subscribed to this new test page, despite following the provided steps. I followed all of them and got the success
response in the subscription step:
https://graph.facebook.com/v2.9/me/subscribed_apps?method=POST&access_token=<TEST_USER_PAGE_ACCESS_TOKEN>
Still, the bot is not connected to the test page. I can send messages back and forth between test users on the test page, but the bot does not respond and I get no activity logs in the webhook.
In a nutshell:
How can I solve this or at least troubleshoot it?
Facebook API v2.9
One easy way to achieve automated testing for messenger bots atleast is to try to mimic a request coming from FB. You can just log the request you are getting to your bot to find the signature of the request that FB sends. Then you can just pretend to be FB by sending http requests with the same signature.
'Bot link' is a link to a Messenger conversation with the Facebook Page connected to your ManyChat account. You can find your bot link in the 'Insights' tab of the 'Home' section under the Facebook Channel (it's blue).
The test user cannot access your real facebook page but you can message your bot (logged in as a test user) via the messenger short link (m.me/your_bot_link).
I used that in the testing steps (and video screencast) for the app permissions review submission.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With