We've created an FB messenger bot and can test it fine with real FB accounts. But we would like to create 2000 test users via the developer console/graph api.
The problem I've come across is that, test users (created via the API) can't see public pages. So I logged in as the test users, created a page, and great! test users can see test pages created by other test users. But now I can't link my bot to that page.
Has anyone managed to get this working? We have made a bot for a large corp and they want to send as many testers at it as possible.
The backup plan is that I create real FB accounts and use those...
Thanks!
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.
Under the Home tab (house icon), you'll see a search bar at the top. Tap it. Facebook Messenger will then show you a small selection of bots it recommends (beneath a list of people you can start chats with). You can also use the search bar at the top of this screen to search for other available bots.
A Facebook Messenger bot is a chatbot that lives within Facebook Messenger, meaning it converses with some of the 1.3 billion people who use Facebook Messenger every month. Chatbots can be programmed to understand questions, provide answers, and execute tasks.
The fix is - in your messenger settings, you will have to request for atleast one permission (i.e. pages_messaging) to allow your bot to send and receive messages. After selecting "Add to submission", you will have to complete the pre-requisites for submission and wait for response from Facebook.
You have to manually link your test user's created page with your bot, for that, first retrieve the test page ID using the following link :
https://graph.facebook.com/v2.6/me/accounts?access_token=<TEST_USER_ACCESS_TOKEN>
Then use the page token to link your bot using :
https://graph.facebook.com/v2.6/me/subscribed_apps?method=POST&access_token=<TEST_USER_PAGE_ACCESS_TOKEN>
(see https://developers.facebook.com/docs/messenger-platform/guides/setup#subscribe_app)
Here is the detailed workaround : https://developers.facebook.com/bugs/230322797329131/?hc_location=ufi
Hope this helps !
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