Can't use test user to access Facebook page with Messenger Bot app
Asked Answered
L

1

18

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:

  1. If I create a page with a real user, I can subscribe the bot successfully to the page, but I can't access the page with test users.
  2. If I create a page with a test user, I can access the page with other test users successfully, but I can't subscribe the bot to the page.

How can I solve this or at least troubleshoot it?

Facebook API v2.9

Louden answered 30/4, 2017 at 17:23 Comment(2)
Test users just don’t work well in this scenario, due to the limitations you already uncovered. The simplest workaround would be, don’t use test users, but a real user account that has a role in the app to test this.Chlores
@CBroe will using a real user work with the new app review process where they require a video showing how to test the bot in order to test the app by themselves?Kb
C
3

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.

Cubbyhole answered 24/6, 2019 at 4:10 Comment(1)
Sadly, this technique has stopped workingBibb

© 2022 - 2024 — McMap. All rights reserved.