Search code examples
twitterprotectedtweets

Is there a way to prevent protected tweets from being displayed in my Twitter app?


I've a little Twitter app that displays a user's tweets if they enter them in a specific format from within my app.

However, even if the Twitter user has protected his/her tweets, those tweets are still being displayed in my app. Is there a flag or some parameter that I could check about the user to see if s/he has protected their tweets, and not display those tweets?

Thanks.


Solution

  • Returned tweet has a "protected" variable, you can use that one.

    json: { "user": { "protected": false } }
    
    xml: <user><protected>false</protected><user>
    

    You can check the examples at the bottom of the page if my answer isn't that clear:

    http://dev.twitter.com/doc/get/statuses/home_timeline