Search code examples
facebookbotsfacebook-messenger

How to maintain a production and development Messenger bot?


Now that my bot is live, I'm trying to understand what the best way is to maintain a production and development version.

My production version is hosted on Heroku and my development version is hosted on my computer and tunneled to a static address. So far, I've been testing the bot by pointing Facebook's webhook from the production environment to the development environment.

This is not ideal for many reasons, which is why I'd like to understand if there's a better approach. It seems like the only way I can do this with Messenger currently is to create a new test page and then a new app that is tied to it and unreleased. Then I can use that test bot via the Messenger app. Is there something I'm missing (i.e., a way to tie my account to a different webhook)?


Solution

  • As far as I can tell, it seems like you have everything set up pretty well. What you described is exactly how I am doing it.

    This is not ideal for many reasons

    What's not good about it? Can you clarify the question?

    EDIT:

    Your heroku hosted and local hosted webhook adresses are different right?

    You should have 2 of the following, 1 of each for both the release and test version:

    Page, App, Server, Repository.

    That way, the test and release version are 2 completely separate entities and there is no interaction between them