Character limit on Claudia's Button template differs from Facebook specs
samcorcos opened this issue · 0 comments
Please use GitHub issues only to report bugs. To ask a general question or request assistance/support, please use the Claudia.js Gitter Chat instead.
To report a bug or a problem, please fill in the sections below. The more you provide, the better we'll be able to help.
- Expected behaviour:
As I understand it, Claudia is mapping the Button template to the Facebook button template. According to the facebook docs, the text
field should be able to handle up to 320 characters:
text must be UTF-8 and has a 320 character limit
- What actually happens:
...however, when I actually run it, I seem to be limited to 80 characters. This code works:
const text = Array(80).fill("x").join('')
return new builder.fbTemplate.Button(text)
.addButton('foo', 'bar')
.get()
and this code does not work:
const text = Array(81).fill("x").join('')
return new builder.fbTemplate.Button(text)
.addButton('foo', 'bar')
.get()
- Which bot engine (facebook, skype...):
- Link to a minimal, executable project that demonstrates the problem:
I can provide one if necessary, but any configured facebook chatbot should have the same behavior.
- Steps to install the project:
no special configuration
- Steps to reproduce the problem:
try to render a Button
with text > 80 chars