Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for PostbackCommands #22

Closed
wants to merge 5 commits into from
Closed

Add Support for PostbackCommands #22

wants to merge 5 commits into from

Conversation

Archweii
Copy link

@Archweii Archweii commented Nov 5, 2016

Use

$webookHandler = new
Tgallice\FBMessenger\WebhookRequestHandler($messenger, <your_secret>,
<verify_token>);

$webookHandler->addPostbackCommand(Tgallice\FBMessenger\Postback\StartPostbackCommand::class);

Tested and working, you have the Postback\StartPostbackCommand as example :), just create more clases with the same structure and just change $name to the name of the payload 馃懐

Use

$webookHandler = new
Tgallice\FBMessenger\WebhookRequestHandler($messenger, <your_secret>,
<verify_token>);

$webookHandler->addPostbackCommand(Tgallice\FBMessenger\Postback\StartPostbackCommand::class);
@tgallice
Copy link
Owner

tgallice commented Nov 5, 2016

Nice @kormid ! I have open an issue #23 if you want look a it. It's a proposal based on your PR implementation but with a more general purpose.

Fixed an error when you haven't asigned a PostbackCommand to a postback.
@tgallice
Copy link
Owner

tgallice commented Nov 5, 2016

@kormid I think the more easy for you is to close this branch and open a new open which will be more clean :) I will merge the PR #19 so maybe update your master branch before create the new one.

@Archweii Archweii closed this Nov 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants