API returns url to Twitter's status update at the end of the text


#1

Hi all,
It looks like the API appends the url to tweet at the end of the text when there’s a picture attached to the tweet.

So for instance if I post a tweet saying:

“hello world google.com” and attach a picture to it, this is what the API returns in the text field

[text] => hello world http://t.co/kvIVnFEHhs http://t.co/G5emQJnkof

The documentation doesn’t mention anything about it, and it seems like there isn’t an option to turn off this feature.
Any ideas?


#2

Not sure if it’s explicitly stated in the developer documentation but it’s listed in the user support page.

Your Tweet’s character count will update to include the pic.twitter.com URL for your photo(s).


#3

The official Twitter apps remove the picture url and quoted status urls programmatically at the app end.

I wonder if @andypiper could clarify for us if we are allowed to do the same (so long as we actually display the quoted tweet or attached image) as I.2.1 of the Developer Rules say

Do not modify, translate or delete a portion of the Content.

#4

Excellent question that I cannot answer directly from my brain at the moment - I’ll see what I can find out.


#5

Thanks @andypiper


#6

Thanks everyone for the insight.
And for pointing out that the same behaviour occurs for re-tweets, I didn’t notice that.


#7

Hey everyone, Great question! We ask that you don’t disable or modify the URLs generated with this behavior per the below policies (https://dev.twitter.com/overview/terms/agreement-and-policy)

Do not modify, translate or delete a portion of the Content.
Maintain the features and functionality of Content and Twitter API. Do not interfere with, intercept, disrupt, filter, or disable any features of Twitter or the Twitter API, including the Content of embedded Tweets and embedded timelines.

Thanks for bringing this up! Let us know if you need any additional clarification.
-Aaron


#8

Thanks @aaronhoff so by that I take it to mean that if we show the embedded tweet inline (like Twitter.com does) we cannot remove the link though (like Twitter.com does)


#9

Hello,

Anybody know how to resolve that?

Thanks,
Akash


#10

This discussion is over a year old. What exactly is the issue you are seeing?


#11

Akash, Aaron already mentioned thact according to twitter policy you do not have permission to modify the content of the tweet.
In case you plan to go against the policy, the api returns the start and end indices for each url, you could easily use these to remove the links.