botman/internals

Add getParameter() to IncomingMessage class to enable deep linking

Opened this issue · 2 comments

Some drivers have a deep linking mechanism, that allows for passing additional parameters to the bot on startup. It could be a command that launches the bot — or an auth token to connect the user's Telegram account to their account on some external service.

class IncomingMessage
{
    /**
    * @return string
    */
    public function getParameter() {
    }
}

This function MUST return the parameter passed in the link.

Note:

  1. Telegram: https://core.telegram.org/bots#deep-linking
  2. Facebook: https://developers.facebook.com/docs/messenger-platform/discovery/m-me-links