miki2826 / botly

Simple Facebook Messenger Bot API
http://developers.askhaley.com
MIT License
92 stars 34 forks source link

One bot for multiple pages #20

Closed ruanmartinelli closed 7 years ago

ruanmartinelli commented 7 years ago

Hi,

My use case involves one single bot taking care of multiple pages. I needed to get it done quickly so I made my own fork and added this function to it.This way I can change the access token based on the pageID that I get on every message.

I was wondering if a similar feature is already provided by botly and if so, what the proper way to switch tokens?

Thanks!

miki2826 commented 7 years ago

Hi @ruanmartinelli I added the options to add an accessToken on the request level. You can manage the page to access token yourself and just pass the correct access token on each request as options.accessToken

Hope it helps.