ANSWERED: LinqToTwitter Object/Properties List?

Mar 16, 2013 at 10:57 PM
Is there a list of possible returned Objects & their properties? I'm assuming they are the same objects that are used in the Twitter API list

I am brand new to both the Twitter API and Linq in general, so I'm probably just missing something simple. I am trying to get any given user's complete status history. I am using the ASP.NET User Demo code as a starting point.

I am not new to SQL, so Linq doesn't seem too foreign to me. I'll post my current query below, but since I haven't been able to test it, it is probably way off. I am trying to get the user's tweet history to show up in the default list view that comes with the demo code. It is set up to display the username & status, so it should work in theory.

My query:
            var userStatusResponse =
                (from tweet in twitterCtx.Status
                 where tweet.Type == StatusType.User &&
                       tweet.ScreenName == txtScreenName.Text &&
                       tweet.Count == Count
                 select tweet).ToList();
Default query:
            var users =
                from tweet in twitterCtx.User
                where tweet.Type == UserType.Show &&
                      tweet.ScreenName == txtScreenName.Text
                select tweet;
I'm assuming that the variable 'tweet' is created on the fly. Similar to how you would use 'name' in a foreach(var name in directory) type situation. The problem is I have no idea what is inside of tweet, or how I can manipulate that data. I can't use it to alter the default ListView either, because I do not know the property name to put it within the "" below:
<asp:Label ID="nameLabel" runat="server" Text='<%#Eval("Name") %>' />
Can anyone help me out? Sourcecode for a complete app that someone has done would be very helpful as well.

Thanks for helping out a noob!
Mar 17, 2013 at 2:08 AM
I found what I needed within the class pages in the LinqToTwitter master project
Mar 17, 2013 at 3:31 AM
Mar 17, 2013 at 3:36 AM
Thanks! Credited :)

I'm also having trouble getting the max 200 tweets back from Status.Count. For my main test user (has 247 tweets) I only get 178 back. I've tried with users that have 5,000 plus tweets and it varies, but never reaches 200.
Mar 17, 2013 at 3:51 AM
Make sure you set your count to 200, which is the max you can request on a single query. Then page through results until you don't receive any more. The max is 3200. I wrote a blog post for Working with Timelines with LINQ to Twitter - it isn't obvious why you have to do this until you read through my explanation and read Twitter's explanation too.

I'm not sure of all the reasons why you wouldn't receive all the tweets, but I know it happens, but whatever data Twitter returns is available through LINQ to Twitter too. Some times it's helpful to search through the Twitter Developer Discussion List to see if other people have asked the same question.