Frage

Twitter automatically shortens links posted via their api to a t.co/??? link. You can however mask the link with a link entity twitter entity docs. However, i cannot find any definitive answer to this question:

Does the length of the entity display link count towards your 140 characters or is it only the t.co link length that gets counted?

Example:

39 Characters

Hello this url is shortened: t.co/abcde

This example still links to t.co/abcde but is 54 characters long

Hello this url is shortened: www.entity-masked-url.com

Which one is the correct length when using entities?

War es hilfreich?

Lösung

All URLs inside Tweets are wrapped in a t.co shortened URL. The full expanded and display-friendly URLs are exposed in Tweet Entities objects on the API, but only the t.co URLs matter in the Tweet length.

For instance, if you are tweeting any HTTPS URL today, it will be 23 characters long when shortened (22 for HTTP URLs), leaving you 117 characters for your Tweet text.

To answer your question, both examples Tweets you mentioned would have a length of 51 characters: 29 for the sentence, 22 for the HTTP URL, regardless of its original length.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top