claudiajs / claudia-bot-builder

Create chat bots for Facebook Messenger, Slack, Amazon Alexa, Skype, Telegram, Viber, Line, GroupMe, Kik and Twilio and deploy to AWS Lambda in minutes
https://claudiajs.com/claudia-bot-builder.html
MIT License
1.84k stars 254 forks source link

Character limit on Claudia's Button template differs from Facebook specs #60

Closed samcorcos closed 7 years ago

samcorcos commented 7 years ago

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.


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

...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()

facebook

I can provide one if necessary, but any configured facebook chatbot should have the same behavior.

no special configuration

try to render a Button with text > 80 chars