How to implement tweet actions and unlike and delete actions while displaying tweets

display-requirements

#1

I am trying to display retrieved tweet results from streaming api onto a website. However, twitter sent the following notice via email. Please guide how to implement the I.B6. of Developer Policy (‘Only surface Twitter activity as it surfaced on Twitter. For example, your Service should execute the unlike and delete actions by removing all relevant Content, not by publicly displaying to other users that the Tweet is no longer liked or has been deleted’) and how to implement tweet actions

This is the notice sent by twitter - .

This is a policy violation notification from Twitter Platform Operations. Your app stores and displays deleted Tweets and is therefore violating our Developer Agreement and Policy. We have performed an initial review and have found that the following sections of the Developer Policy are being violated:

  • I.B.3. Promptly respond to Content changes reported through the Twitter API, such as deletions or the public/protected status of Tweets.
  • I.B.6. Only surface Twitter activity as it surfaced on Twitter. For example, your Service should execute the unlike and delete actions by removing all relevant Content, not by publicly displaying to other users that the Tweet is no longer liked or has been deleted.

Additionally, your site is currently violating Twitter’s Display Requirements regarding how applications and services which interact with the Twitter API display Tweets. Your site must be modified to display the following from each Tweet:

Full Name

Avatar

Timestamp

Logo

Username

Tweet Text

Tweet Actions

To prevent suspension of this API key, please do the following

Change the features of the application that are not compliant with our Rules

Reply to this email to inform us that the necessary changes have been made.

Regards,

Twitter Platform Operations


#2

Are you storing and displaying Tweets that have been deleted by the originating user on Twitter? This is against the developer policy.

Check the Tweet IDs in your database against the original Tweet IDs on Twitter. If any of the API calls return HTTP 404 / Error code 144 then they have been deleted, and you should not store or display them in your app. You should take prompt action to remove the data, per the policy.

The second part of the notice relates to the Twitter Display Requirements which you can find here.


#3

Meaning we can run this script for checking deleted tweets with cron once in a day (Because to check whole database is resource intensive) ?

Will this require connecting with the twitter API ? (My IP has been blocked by twitter)


#4

Yes, to check those Tweet IDs using the method I just described you’d want to use the REST API statuses/show or statuses/lookup endpoints. I cannot comment on whether once a day is sufficiently prompt behaviour - ideally you’d never store Tweets, just the IDs, and look them up at runtime for display to avoid accidentally exposing deleted content. Of course, there are circumstances where caching some data may be preferred.

Another alternative method would be to use Twitter’s embedded Tweets and timelines to display content in your app, passing in the Tweet IDs you want to show. That would automatically mean that your app would conform with the display requirements without you having to implement them yourself, and any Tweets that have been deleted would not be able to be displayed.


#5

We are using Twitter streaming API to retrieve tweets text and related data according to defined keywords. So, say I have a list of tweet IDs for a defined keyword, can you please give documentation for embedding those collection of tweets ? I read that max width of embedded timeline is 520px

I suppose this also would require to be connected to twitter API (and our IP is restricted by twitter at present)


#6

Andy,

  1. Say I have three columns -

First column will be having the embedded timeline containing text of the tweets, avatar, user name, name and date time of the tweet for the required keyword collection. This will be obtained after passing the IDs for the specific keyword collection.

Second will be having the location of the tweet sender and third the profile of the tweet sender.

Will that be according to twitter guidelines ?

=========================

  1. A question which arises is why has twitter made things so complicated and resource intensive ?

Basically, I have to keep on connecting with twitter all the time in order to check whether the tweets have been deleted or not.

This is obviously resource intensive for both the displaying server and also the twitter server.

Would it not be better in all respects if twitter allowed deleted tweets to be displayed ?

  1. What is the type of API needed for using embedded timelines and is there any rate limits ?

#7

Embedded Tweets or timelines would not require server IP access to the API, as they are rendered in the client browser via Javascript (and deleted Tweets cannot be displayed). If you want to use the oEmbed API though, yes, you’d need IP access. The notice you’ve received seems very clear on the requirements for display. You’re not obliged to use our widgets for display but they do usually make it easier to handle the display requirements.

I’m sorry that you feel that the effort required to comply with Twitter’s terms of service and developer policy regarding data retention is high - as I mentioned, it really depends on the way in which you’ve implemented your solution. If you were only storing Tweet IDs, then they would not be retrievable for display if they were deleted, so that’s a simple way to comply. The Streaming API (for example) provides status deletion notices so that you can respond in real-time. The commercial Gnip API has a Compliance stream for the same purpose. We take user privacy very seriously, and expected deleted or modified content to be respected by developers.

I’d recommend that you respond to the notice as directed, as we cannot answer detailed questions about individual apps in these forums.

Thank you.


Embedded tweet collection timelines
#8