Exclude media urls from tweet text api response

restapi
media
search
extended-tweet

#1

We are currently using twitter timeline search API (as shown below)

https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name={user_name}&include_rts=false&exclude_replies=true&count={3}&tweet_mode=extended

We are able to get the response from API above, however whenever any tweet contains the link as a part of the tweet text along with the media information (such as image or video), then in twitter API response, the full_text field contains two links i.e. the one which is added as a part of tweet content and other is the actual tweet url (on click it opens up actual tweet in the modal popup or in an iframe)

Is there any way to exclude this additional link from api response from the full_text field?

Example
Current response:
full_text: “This is test image https://t.co/zLHvZPE8J3 https://t.co/sua4kSCjY6

Expected response:
full_text: “This is test image https://t.co/zLHvZPE8J3

Thanks in advance.


#2

No, that is not possible, you would have to remove it yourself.


#3

Is it still not possible until now? I mean with all new APIs?
If not, then how Hootsuit displays tweets with attachments without any links?

And, how I’ll know if the link I’m removing is an attachment link or just a link in the tweet?!


#4

I assume Hootsuite are removing the attachment URL by using the display range values in the Tweet object, which is the correct behaviour.