streaming api

3 views
Skip to first unread message

rizwan khann

unread,
Mar 20, 2010, 6:01:17 AM3/20/10
to Twitter Development Talk
Hi
i run this code but it just give me 100 status whose
track "twitter" word
but it not work as a stream...and not continue update for real time.
plz tell me which method use to continue stream
i m using TweetSharp Preview 24 API

var twitter = FluentTwitter.CreateRequest()
.AuthenticateAs(TWITTER_USERNAME, TWITTER_PASSWORD)
.Configuration.TimeoutAfter(1.Minute())
.Configuration.UseAutomaticRetries(RetryOn.ConnectionClosed, 2)
.Stream().FromFilter()
.For(10.Seconds()).Take(100)
.Tracking("Twitter") // Add other filter options here...
.CallbackTo((sender, result) =>
{
var statuses = result.AsStatuses();
foreach (var status in statuses)
{
Console.WriteLine("{0}: {1}", status.User.ScreenName,
status.Text);
}

});
twitter.RequestAsync();

John Kalucki

unread,
Mar 20, 2010, 11:52:21 AM3/20/10
to twitter-deve...@googlegroups.com
Perhaps the 10.Seconds() and Take(100) functions are limiting your output? It seems that this framework is perhaps not streaming, but assuming a finite response size? I'd ask on the TweetSharp dev list.

-John Kalucki
http://twitter.com/jkalucki
Infrastructure, Twitter Inc.


To unsubscribe from this group, send email to twitter-development-talk+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Michael Steuer

unread,
Mar 20, 2010, 11:56:26 AM3/20/10
to twitter-deve...@googlegroups.com, Twitter Development Talk
I'm not familiar with your library but by just looking at the snippet
you see
> .For(10.Seconds()).Take(100)
I'd imagine if instead of 10 seconds you'd pass 10 years and instead
of 100 you'd pass something infinitely larger, you'd experience more
of a stream?

Reply all
Reply to author
Forward
0 new messages