messenger-platform-go-sdk
messenger-platform-go-sdk copied to clipboard
ButtonTemplate not working
Users are forced to use GenericTemplate instead of ButtonTemplate because ButtonTemplate requires a 'buttons' field, not 'elements' field.
mq.Template(template.GenericTemplate{Title: title,
Buttons: []template.Button{
{
Type: template.ButtonTypePostback,
Payload: postbackPayload,
Title: buttonTitle,
},
},
})
Hello, @seenickcode It indeed looks like facebook has changed the way it handles templates now. It requires a bit more work than I thought it would. I will eventually get this fixed, but pull requests are more than welcome :)
Thanks for reporting the issue.
Great thank you.
On Sat, Jun 24, 2017 at 8:29 PM, Maciej Mionskowski < [email protected]> wrote:
Hello, @seenickcode https://github.com/seenickcode It indeed looks like facebook has changed the way it handles templates now. It requires a bit more work than I thought it would. I will eventually get this fixed, but pull requests are more than welcome :)
Thanks for reporting the issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maciekmm/messenger-platform-go-sdk/issues/30#issuecomment-310856754, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEoOa7hqZtCsF7KFiaxEKu9dDA26wgAks5sHVWmgaJpZM4ODfYo .
--
Mit freundlichen Grüßen, Nicholas
Ok opened https://github.com/maciekmm/messenger-platform-go-sdk/pull/31
Hey @maciekmm could you take a look when you get a chance? I have another PR I'm waiting to open too once this fix is complete. Thanks.
@seenickcode @maciekmm any updates?
@stanleyye @seenickcode 's contribution unfortunately does not meet coding standards of this repository. I am currently pretty busy and thus having no time to contribute. If you happen to implement this feature on your own please consider doing a pull request.
It appears that this library is abandonware because Facebook changes its features often as the @maciekmm doesn't have time to maintain. The PR I submitted doesn't "meet coding standards" because the test coverage went down by 5.7%. I'm not sure how to submit a PR of a fork. Does this article explain a recommendation properly? http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html if so I will follow it and re-submit.
I followed roughly those steps with my recent successful PR here #24.
@seenickcode It doesn't even pass the remaining tests. I am okay with lowering coverage a bit for a short period of time if there are benefits to that. But I am not okay with the travis not building it correctly.
That's fair and I forgot about that they were indeed failing. Will revisit this next month because too busy now unfortunately.
On Aug 9, 2017, 7:37 PM +0200, Maciej Mionskowski [email protected], wrote:
@seenickcode It doesn't even pass the remaining tests. I am okay with lowering coverage a bit for a short period of time if there are benefits to that. But I am not okay with the travis not building it correctly. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.