Search code examples
botsfacebook-messengermessenger

Add my messenger app ("bot") to page without any manual intervention


I would like to know if there is any option for other business ("customer") to add my messenger app ("bot") to their page without any manual intervention.

The current process is:

  1. customer wants to add my bot.
  2. customer add my as admin to his page - Manual.
  3. I accept the invitation - Manual.
  4. I connect the bot to the page + generate token - Manual (I succeed to automate it once I became admin).

Any advise regarding step 3? Or there is other flow that I should do?

Thanks!


Solution

  • You should use FB Login and request the pages_messaging and manage_pages scopes. Once the user logs in, they will grant the scopes to your app and you will be able to generate the Page tokens. This also removes the need for you to be an Admin on the Page, which many customers tend not to like to grant.