Depends what you want to accomplish. I build them like an old-school RT so I …
1- Remove the link to wherever
2 - Remove the media URL if it exists
3 - Remove the @mention add RT or By to it.
3 - Bust the tweet text into an array
4 - Keep adding words back while checking for length … taking into account “RT @mention” length + media URL + link + hashtags if any (Note that URL lengths are fixed. Welcome to Twitter-math)
5 - Once I get too long, I take a step back and add an ellipsis.
6 - Reassemble the new tweet as "RT @mention “Tweet text with or without ellipsis media URL” link hashtag(s)
Based on a comment on another thread by Andy Piper, I will be modifying that to put hashtags before the link.It seems that text after the link may stop video autoplay.
Lately, I have been adding a step that replaces the @ with # to avoid hissy fits.
Paul