paked/messenger

Handling multiple pages

Closed this issue · 4 comments

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?

@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.

Oh, it was such a long time ago. Solved it somehow, probably.. :D

@paked I think that you can close this issue.

paked commented

Thanks everyone :)