tags:

views:

419

answers:

3

What LINQ providers exist for Twitter and how do they compare? Are there any that let you query tweets, following, and followers in addition to publishing tweets? What about relational support? e.g.

from user in my-followers
where user.name.contains("drew")
and user.followers.count > 10
from tweet in user.tweets
where tweet.message.length < 100
select tweet.message

Edit: Yes, I can easily find Twitter APIs using Google. What's interesting is a comparison of the available libraries in terms of their LINQ capabilities, object-orientedness, and feature support.

+4  A: 
NinethSense
Yep really! :-)
NinethSense
Nathan Koop
One of the function of SO is to create "canonical" answers to programming questions people might reasonably ask, so the only problem I'd see with this question is the terseness of the actual title of the question, which makes it not as meaningful to a search engine as it might be
Rafe Lavelle
@Ralph, agreed, I think the edit improved the question. The original left something to be desired.
Nathan Koop
+4  A: 

There's also the tweet# project which provides a fluent twitter API

lomaxx
+2  A: 

There is no real LINQ to Twitter, sorry. That would imply that you can somehow query Twitter's own data store. It's simply not that flexible.

TweetSharp lets you define a query based on the API and you can turn the response into data classes in one line of code and use LINQ over Objects with the result, but expecting LINQ to act like a true filter with delayed execution and all the rest is a failed metaphor against a REST API.

Daniel Crenna
Delayed execution is not a fundamental part of the definition of LINQ. Why do you call LinqToTwitter a metaphor? Transforming a language integrated query into a REST API call is pretty cool.
Dennis Palmer
One of the major points of LINQ is to abstract some of the underlying implementation. So, a LINQ provider that gives you queries over the web API is just as good as one that would provide access to the same underlying data.LINQ to Twitter does exist: http://www.codeplex.com/LinqToTwitter It converts LINQ queries to API queries and works great for me. I used TweetSharp for a while and prefer LINQ to Twitter.
J Wynia
But it can't convert LINQ queries beyond the REST seam. So if you ask for all users whose ScreenName starts with "Foo", what happens? It is not a query it is a construction. Glad you found a tool you like my biased self says LINQ is the wrong hammer for this nail.
Daniel Crenna
If I'm wrong in terms of how it works, correct me. TweetSharp does the same job of taking state / intent and converting it into an API call. If LINQ is a good solution to that than it wouldn't be a daunting task to give you the option to express it in LINQ. Enlighten me. @dimebrain / [email protected]
Daniel Crenna