Facebook Messenger Bot, test users, has anyone got

2019-05-02 22:40发布

问题:

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!

回答1:

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 !