This project has moved and is read-only. For the latest updates, please go here.

Getting more then 20

May 10, 2011 at 7:51 PM



I  am having a difficult time trying to get more then 20 public statuses right now. I was able to get the j quiery carousel to work which is a major thing for me lol.  I figured I would get working what I need to do before I code in my private timeline.


This is a basic time line from the public in webforms.  I just want to grab more then 20 so my carousel looks nice.  Nothing difficult yet. no classes.


  var TwitterCtx = new TwitterContext();

            var gettweets = from tweets in TwitterCtx.Status
                       where tweets.Type == StatusType.Public
                       select tweets;

            ListView1.DataSource = gettweets;


The front end


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Defaultlistviewtest.aspx.cs" Inherits="Webformstest.Default" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
<link rel="stylesheet" href="skins/style.css" type="text/css" media="screen" />
<script src="scripts/jquery-latest.pack.js" type="text/javascript"></script>
<script src="scripts/jcarousellite_1.0.1c4.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {

            vertical: true,
            hoverPause: true,
            visible: 4,
            auto: 1,
            speed: 5000


     <div id="newsticker-demo">
     <div class="title">Latest Tweets</div>

    <asp:ListView ID="ListView1" runat="server">

    <asp:PlaceHolder runat="server" ID="ItemPlaceholder">    </asp:PlaceHolder>

    <div class="newsticker-jcarousellite">
                <div class="thumbnail">
                   <asp:Image ID="UserImage" runat="server" ImageUrl='<%#Eval("User.ProfileImageUrl") %>' />
                  <div class="info">
                     <asp:Label ID="Label1" runat="server" Text="Twitter Name: "><b></bold> <%#Eval ("User.Name") %></b> </asp:Label> <br />
                     <asp:label ID="Label2"  runat="server" Text=""> <b>Message</b>  <%# Eval ("Text")%> </asp:Label> 
                <div class="clear"></div>




I dont need coding help.  Well I prolly do but  this isnt the place to ask.  I think i am trying to do the Linq Query wrong.  Trying to  Use 

   var gettweets = from tweets in TwitterCtx.Status
                       where tweets.Type == StatusType.Public
                   &&  tweets.count  == 50
                       select tweets;


Im getting a null response.   Do i go for == 50?    because count is used to count not to show. 


I hope this is considered a legitimate linqtotwitter question lol.


May 10, 2011 at 9:35 PM

I also have an unrelated question.


If i store tweets to a database would it grow too large quickly for a  single user timeline on a shared hosting environment or should i use client side caching instead.  None of the data is useful yet. im not asking how to do either just wondering if I would kill a web host and inserting all that data if it became popular destination.

May 10, 2011 at 10:06 PM


Public queries only support getting 20 tweets at a time. You'll often see more criteria, such as Count, than are available for a given query.  That's because Status query accounts for different types of queries, defined by the StatusType enum.  To help figure out what parameters are available for a specified query, you can check out the docs at Making API Calls.  In the case of Public Status queries, which you're using, there aren't any available parameters, other than Type (which is a LINQ to Twitter idiom required on all queries).

As you know by now, the issue with Public Status queries is that you can only get 20 at a time.  Since There are rate limits, you'll quickly exceed your limits and not get everything that is available.  Furthermore, the amount of tweets coming from Twitter is so large that Public Status queries could never keep up. 

Other options available include streams, Home queries, or Search queries.  The Firehose is a stream that returns everything, but it isn't available for free and you have to get permission to access it.  Alternatively, there's a company,, that has partnered with Twitter and supplies the firehose, but you'll have to pay for that.  Home, Friend, and User Status queries will allow you to query a specific user and/or their friends.  Another option is to use the Search API.  The thing about the Search API is that you have to give it some criteria to filter results with.  That's what's available.  I hope there's something in there that's useful.


May 10, 2011 at 10:13 PM
Edited May 10, 2011 at 10:13 PM

ah ha!  Thats why i didnt see a count in the api doc.  Ill just have to test my code using one of the other ways.  Thank you for the clarification.  But was my query right if it was supported


and thank you.

May 10, 2011 at 10:14 PM

To figure out what your storage requirements are, take the data you're going to collect and figure out how many bytes/record and increase the size a little to account for database management overhead.  Then multiply the size of the record by the number of records you expect to store in a given period of time.  i.e. day, week, or month.  Then you can project how much storage space you'll need in the future and how that compares to the hosting plan or deployment environment you're working in.  Less easier to predict is the amount of bandwidth you'll be using. You'll have to take your page size, including the size of any tweet data (or any data) included in the page and figure how many Gb you'll use per month.  Watch the trend so you can see what you need to buy moving forward.  If you're on shared hosting, performance is unpredictable, so you'll just have to watch how things are going and do research on whether you should move to a virtual private server, private server, or cloud option.  Azure might be a viable consideration.


May 10, 2011 at 10:18 PM

I might also add that I only wrote a single paragraph that vaguely describes some of the considerations of scalability and performance for an application interfacing with Twitter.  Performance and scalability are complex subjects and can't be succinctly described in a single post.  However, I just wanted to throw out a few things that might help you get started with that thought process.