Handling multiple pages
Closed this issue · 4 comments
lawzava commented
Is it possible, if so - how to handle multiple pages with the same endpoint?
Something like Chatfuel? When you connect your page and bot serves that page.
Dump way:
for i := 0; i < n; i++ {
client := messenger.New(...)
http.Handle("/messenger", client.Handler())
}
This throws error that "/messenger" already registered. Is there a smarter way to this?
dgellow commented
@hitchnsmile I'm a bit confused by your question. What are you trying to do? Go's net/http will not let you register multiple handlers for the same path, that's for sure.
lawzava commented
Oh, it was such a long time ago. Solved it somehow, probably.. :D
paked commented
Thanks everyone :)