paked / messenger

Package messenger is used for making bots for use with Facebook messenger
MIT License
274 stars 72 forks source link

Handling multiple pages #34

Closed lawzava closed 6 years ago

lawzava commented 7 years ago

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 6 years ago

@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 6 years ago

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

dgellow commented 6 years ago

@paked I think that you can close this issue.

paked commented 6 years ago

Thanks everyone :)