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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set menu not working #30

Closed
jnepal opened this issue Apr 22, 2017 · 21 comments
Closed

set menu not working #30

jnepal opened this issue Apr 22, 2017 · 21 comments

Comments

@jnepal
Copy link

jnepal commented Apr 22, 2017

struggling to implement persistent view. case 'set menu' doesn't work. Any Help would be appreciated @wittfabian

@wittfabian
Copy link
Contributor

Any error messanges?

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

No errors. Isn't the persistent menu expected to popup when the message received is set menu just like generic message popup when the message received is generic?

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

Any Documentation on how to use persistent menu ? I want persistent menu to popup when user sends a certain string. is that possible ? how can it be achieved ?

@wittfabian
Copy link
Contributor

I thinks thats not an use Case of the persistent menu. You can use structured Message eg.

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

I want structured Message with button with 6 elements. but it seems only 3 elements is possible at max. Any Suggestion on how can i achieve ?

@wittfabian
Copy link
Contributor

Ist there any documentation about this Limit?

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

When i tried this in one of cases. Nothing would show up. Any idea ? but works fine for only three elements

$bot->send(new StructuredMessage($message['sender']['id'],
            StructuredMessage::TYPE_BUTTON,
            [
                'text' => 'Choose category',
                'buttons' => [
                    new MessageButton(MessageButton::TYPE_POSTBACK, 'First button'),
                    new MessageButton(MessageButton::TYPE_POSTBACK, 'Second button'),
                    new MessageButton(MessageButton::TYPE_POSTBACK, 'Third button'),
                    new MessageButton(MessageButton::TYPE_POSTBACK, 'Fourth button'),
                    new MessageButton(MessageButton::TYPE_POSTBACK, 'Fifth `button')`
                ]
            ]
));

@wittfabian
Copy link
Contributor

wittfabian commented Apr 23, 2017

I found it in the documentation. A maximum of 3 buttons

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

Have you integrated webview ?

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

or quick replies ?

@wittfabian
Copy link
Contributor

quick replies => yes

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

could you show me how to use ? any documentation

@wittfabian
Copy link
Contributor

You can use "Quick Replies" with most of the messenger elements.
Check:
pimax/fb-messenger-php#93

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

Thanks mate @wittfabian for the support and awesome library :)

@wittfabian
Copy link
Contributor

You are welcome

@wittfabian
Copy link
Contributor

I have updated index.php

@wittfabian
Copy link
Contributor

Standalone:

$bot->send(new QuickReply($message['sender']['id'], 'Your ad here!', 
        [
            new QuickReplyButton(QuickReplyButton::TYPE_TEXT, 'QR button 1', 'PAYLOAD 1'),
            new QuickReplyButton(QuickReplyButton::TYPE_TEXT, 'QR button 2', 'PAYLOAD 2'),
            new QuickReplyButton(QuickReplyButton::TYPE_TEXT, 'QR button 3', 'PAYLOAD 3'),
        ]
));

@jnepal
Copy link
Author

jnepal commented Apr 23, 2017

Thank You :)

@wittfabian
Copy link
Contributor

QuickReply is restricted to 11 elements

@jbshrestha
Copy link

I found it in the documentation. A maximum of 3 buttons

Have you found any solution on how to integrate more than 3 buttons?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants