Get Protected Tweets from twitterCtx.Search

Sep 30, 2013 at 5:17 PM
Edited Sep 30, 2013 at 5:37 PM
I'm developing an application that will need to read tweets from the public search results. During development we'd like to have the twitter accounts posting using the "protect my tweets" twitter privacy setting. This is to prevent the tweets from being public while we're in development / testing.

The only way I've been able to get it to work is to do a bunch of twitterCtx.Status queries for each test account. However, this is not the way the final application will operate, so I'd much rather be able to get these tweets through twitterCtx.Search instead.

I am creating my context with the SingleUserAuthorizer as is explained here: https://linqtotwitter.codeplex.com/wikipage?title=Single%20User%20Authorization

This is the query that I would like to also return protected tweets (but does not):
var twitterSearch =
  (from search in twitterCtx.Search
    where search.Type == SearchType.Search &&
      search.Query == txtTwitterText.Text
      && search.IncludeEntities == true
      && search.Count == 30
select search).SingleOrDefault();
This is the query that does return protected tweets but requires going in to each user's statuses and would not work for the live application:
 var statusTweets =
   (from tweet in twitterCtx.Status
  where tweet.Type == StatusType.User
    && tweet.UserID == "1234567" //user one
  select tweet).ToList();

var nextSet = (from tweet in twitterCtx.Status
  where tweet.Type == StatusType.User
    && tweet.UserID == "2345678" //user two
  select tweet).ToList();

statusTweets.AddRange(nextSet);
Is there a way to accomplish what I'm after?

Edit: I am using version 2.1.5. If required I could update.
Coordinator
Sep 30, 2013 at 6:21 PM
Hi,

I use special test accounts so that testing tweets don't affect my normal followers.

@JoeMayo
Sep 30, 2013 at 6:24 PM
Ah, that was the other thing I had thought of as a possibility, but it would mean that the tweets themselves are still public and could potentially be "found". So there's no way to get at protected tweets through the Search interface?