6

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 Answers1

7

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 !

Simon Oualid
  • 365
  • 2
  • 9
  • Nice one Simon thank you!, I'll give it a go shortly. – Paul Broomfield Nov 16 '16 at 23:50
  • 1
    Thanks Simon, this working - one thing to make anyone does that comes across this is to exchange the short lived page token for a long one. Otherwise as soon as your test user logs out your bot won't be able to take to the test page again. https://developers.facebook.com/docs/facebook-login/access-tokens/expiration-and-extension GET /oauth/access_token? grant_type=fb_exchange_token& client_id={app-id}& client_secret={app-secret}& fb_exchange_token={short-lived-token} – Paul Broomfield Nov 21 '16 at 23:01
  • 2
    I can't get the info about accounts, this is the result: { "data": [] } – Israel Barba Oct 13 '17 at 02:34