julien-c / Circular

An open source Buffer app clone
http://circular.io
MIT License
1.03k stars 193 forks source link

Twitter character counter should account for Twitter automatic link shortening. #48

Closed dhilowitz closed 9 years ago

dhilowitz commented 9 years ago

There's an easy way to implement this as Twitter offer a javascript library for counting characters: https://github.com/twitter/twitter-text/tree/master/js

*Remaining character count example&

var tweet = "This is a test tweet":
var remainingCharacters = 140 - twttr.txt.getTweetLength(tweet);

getTweetLength returns the computed length of a tweet after taking into consideration t.co URL shortening and non UTF-16 characters

julien-c commented 9 years ago

Good idea. Care to try and have a shot at implementing it?

Otherwise I'll try and do it.

potomak commented 9 years ago

I'd like to work on this feature if help is needed.

dhilowitz commented 9 years ago

Go for it! I probably won't have any free time for a month or two. :(

On Apr 2, 2015, at 5:59 PM, Giovanni Cappellotto notifications@github.com wrote:

I'd like to work on this feature if help is needed.

— Reply to this email directly or view it on GitHub.

julien-c commented 9 years ago

Closed by #58. Hat tip @potomak :)

potomak commented 9 years ago

@julien-c I think this could be closed now, my update seems to work.