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 252 forks source link

fix: character length on facebook button template #61

Closed samcorcos closed 7 years ago

samcorcos commented 7 years ago

This changes the character limit on the Facebook Button template to the value defined in the Facebook docs

text must be UTF-8 and has a 320 character limit

resolves #60

samcorcos commented 7 years ago

I'm having a hard time testing this in dev to make sure it works properly. Any advice on that front would be helpful :)

stojanovic commented 7 years ago

You need to update the test for that, it should be this one: https://github.com/claudiajs/claudia-bot-builder/blob/master/spec/facebook/facebook-format-message-spec.js#L354-L356

Run npm test -- full and you'll see all the test that are failing.

Fot testing in the project, simply install your version of claudia bot builder with npm i https://github.com/samcorcos/claudia-bot-builder and you'll have bot that is using it.

Limit was probably updated by Facebook in last few updates, thanks for reporting and fixing it :)

stojanovic commented 7 years ago

Can you also update the same thing for the buttons in Generic template?

Thanks :)

samcorcos commented 7 years ago

What do you mean by the buttons in the generic template? I think the generic template still limits you to 80 chars and 80 chars.

title has a 80 character limit subtitle has a 80 character limit

samcorcos commented 7 years ago

Just tested it locally and it runs as expected :)

stojanovic commented 7 years ago

@samcorcos button object in generic template, bottom of that page, for title and subtitle it's still 80 characters I'll update that, thanks for this!