Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

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

Closed
dhilowitz opened this issue Feb 28, 2015 · 5 comments

Comments

@dhilowitz
Copy link
Contributor

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
Copy link
Owner

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

Otherwise I'll try and do it.

@potomak
Copy link
Contributor

potomak commented Apr 2, 2015

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

@dhilowitz
Copy link
Contributor Author

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.

This was referenced Apr 5, 2015
@julien-c
Copy link
Owner

julien-c commented Apr 8, 2015

Closed by #58. Hat tip @potomak :)

@potomak
Copy link
Contributor

potomak commented Apr 8, 2015

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

@julien-c julien-c closed this as completed Apr 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants