What other setting should I update or check?
I can post the code, but there was no code change at all - from when it worked, until it broke - so that probably won't help.
Edit:
When trying to generate a new token, I get:
Invalid Scopes: manage_pages, pages_messaging, pages_messaging_phone_number, pages_messaging_subscriptions. This message is only shown to developers. Users of your app will ignore these permissions if present. Please read the documentation for valid permissions at: https://developers.facebook.com/docs/facebook-login/permissions
Edit: Making the bot private ("developer mode") allowed me to generate a new token. I pushed the new token to Dropbox and Heroku, and the bot started responding to commands again (working), but making it public broke it again.
Edit: I now see that under the Bot's page, in Messenger > Settings, it says that I need permission to use the "API Send (pages_messaging)". I've sent a request for that...
Are such permissions always required for a Bot to work?
Notes:
- I never tested it with an account other then mine (the developer account for the bot), so it can be that it never "worked" while public. It is newly made.
- By now, the title of this post maybe should change to "bot broken after making it public", but I'm not sure about that being the case just yet.
Renaming shouldn't be an issue, provided you rename it in all necessary locations (including but not necessarily limited to: developers.facebook.com, Heroku).
pages_messaging
. Scrolling down on the "Messenger" page (on developers.facebook.com), you can initiate the request, and it will prompt you to fill any required information, such as your app's privacy policy, icon, as well as temporarily add several accounts as testers for your app (these accounts will be provided to you in that prompt), plus adding those same accounts as editors of the Facebook page you want to use the bot on.
Notes:
- I'm not sure if
pages_messaging
is required for a Facebook bot altogether, or only if one also wants the bot to be available on the Messenger platform, but because that's what I wanted for my bot, I selected that feature when setting up the bot to be public and initiate the request.- Initiating a request will toggle your bot back to "private" (invisible to non-admin accounts).
- A useful sanity check (which helped me a few times) if things break and you are not sure why, is generating a new token by "selecting" your page again under the App's settings (don't forget to actually use that token and push changes).