0

I had to implement the remaining character count functionality (according to Twitter rules).

Can someone point me to JS library/function I can use directly?

issprof
  • 55
  • 4
  • Wait, so what are you asking? If you're looking to see how it can be improved try [Code Review](https://codereview.stackexchange.com). – gcampbell Jul 04 '16 at 15:20
  • Edited my original question according to what I exactly wanted - and I have already found the answer below. – issprof Jul 06 '16 at 06:21

1 Answers1

2

Twitter provide the Twitter Text JavaScript library - it contains their official character count.

twttr.txt.getTweetLength() is the function you need.

Terence Eden
  • 14,034
  • 3
  • 48
  • 89