Geeks With Blogs

Joe Mayo Twitter
Uploading Multiple Images in Parallel with Async and LINQ to Twitter
The Twitter API recently deprecated the statuses/update_with_media endpoint, which LINQ to Twitter abstracts via a TweetWithMedia method. It’s replaced with a new endpoint, media/upload, and a new parameter to statuses/update, media_ids. The benefit of the new API change is that you can now tweet multiple images. Naturally, LINQ to Twitter supports this capability. However, what’s really interesting is that you can upload multiple images at the same time with Task.WhenAll. This post explains how ......

Posted On Tuesday, October 21, 2014 11:34 PM

Released LINQ to Twitter v3.0.2
Today, I released LINQ to Twitter v3.0.2. This release takes LINQ to Twitter v3.0 out of beta and into a stable release. The primary features of this release are async commands/queries and Portable Class Library (PCL) support. Supporting Async The async support makes your application more responsive to the user, increases server scalability, and makes coding simpler (especially in technologies like Windows Phone where async is required). Here's an example of how to perform an async query: var tweets ......

Posted On Monday, February 3, 2014 9:10 AM

LINQ to Twitter Async
The next version of LINQ to Twitter will be async. I’m currently doing some early spikes and everything is coming together nicely. Here’s a sample of what the syntax looks like, starting with Authorization. Here’s a standard PinAuthorizer, which allows you to authorize from console, desktop, or Windows Phone applications: async static Task TestLinqToTwitterAsync() { var credStore = new InMemoryCredentialStore { ConsumerKey = ConfigurationManager.AppSet... ConsumerSecret = ......

Posted On Friday, October 4, 2013 9:23 AM

WinRtAuthorizer–A Better Way to do OAuth with LINQ to Twitter in Windows 8
Last July, I blogged about how to do OAuth in Windows 8 with LINQ to Twitter: A the time, that worked well, but was still not an optimal solution. It required setting up a page to handle a WebBrowser control, navigating to that page, authorizing, and then asked the user to copy a PIN into a text box to complete the dance. You still have to do that with desktop and Windows Phone apps, but not with Windows ......

Posted On Saturday, January 19, 2013 2:07 PM

Working with Timelines with LINQ to Twitter
When first working with the Twitter API, I thought that using SinceID would be an effective way to page through timelines. In practice it doesn’t work well for various reasons. To explain why, Twitter published an excellent document that is a must-read for anyone working with timelines: Twitter Documentation: Working with Timelines This post shows how to implement the recommended strategies in that document by using LINQ to Twitter. You should read the document in it’s entirety before moving on because ......

Posted On Sunday, September 2, 2012 8:29 PM

Refactoring Windows 8 Code-Behind to MVVM
In my previous post, Using LINQ to Twitter in Windows 8 Metro Apps, I cheated a little (some might say a lot) on my UI architecture by using code-behind. In this post, I’ll make it all better by showing you how to separate the model and interaction logic from the UI design – proper separation of concerns. I’ll accomplish this with a pattern, named Model-View-ViewModel (MVVM), which is widely used for WPF, Silverlight, and (soon) Windows 8 Metro Apps. I’ll start by discussing what MVVM is, move to ......

Posted On Monday, January 30, 2012 9:22 AM

Using LINQ to Twitter in Windows 8 Metro Apps
While the title of this post suggests focus on LINQ to Twitter, it also indicates that I’ll be discussing how to build a Windows 8 Metro application. The application itself will display a list of tweets from Twitter’s public feed. In the sections that follow, you’ll read background information on pre-requisites to understanding the post, learn how to get LINQ to Twitter working with Visual Studio 11, and then see a step-by-step on how the application is built. Getting Started You can build Metro ......

Posted On Thursday, January 26, 2012 10:11 AM

Creating a NuGet Package for LINQ to Twitter
Giovanni Bassi published the original NuGet package for LINQ to Twitter (L2T), which I'm appreciative of. Since then, I have yet to do a release myself, but that is changing now. The current version of LINQ to Twitter is stable enough for a release, so the time is right. I think there are a few aspects of a LINQ to Twitter NuGet package that aren't as simple as point at a project and your done, so I'll document my process here in case anyone else is interested. Getting Started I had played around ......

Posted On Monday, July 11, 2011 4:34 AM

DataSprings Blog Post

Here's a blog post by DataSprings on how to use LINQ to Twitter:  It demonstrates how to authenticate with OAuth and how to use several of the APIs.


Posted On Monday, June 6, 2011 6:32 PM

Displaying Search Results With LINQ to Twitter and ASP.NET MVC
Sometimes, the way that LINQ to Twitter materializes queries into entities isn’t immediately clear. It’s easy to get confused until you see the patterns or make a correlation between the Twitter API results and their representations as LINQ to Twitter entities. In this post, I’ll explain some of the logic behind the design of LINQ to Twitter entities and demonstrate an example of one of the more oddly designed entity types, Search. Note: They'll be talking about MVC3 during multiple sessions at Tech-Ed. ......

Posted On Thursday, April 28, 2011 8:27 AM

Released LINQ to Twitter Beta v2.0.20

I released LINQ to Twitter Beta v2.0.20:  Most of the items were bug fixes.  A couple items were new: Geo Search and I finished adding Asynch support for non-Silverlight APIs.


Posted On Sunday, March 6, 2011 8:24 PM

LINQ to Twitter Queries with LINQPad
LINQPad is a popular utility for .NET developers who use LINQ a lot. In addition to standard SQL queries, LINQPad also supports other types of LINQ providers, including LINQ to Twitter. The following sections explain how to set up LINQPad for making queries with LINQ to Twitter. LINQPad comes in a couple versions and this example uses LINQPad4, which runs on the .NET Framework 4.0. 1. The first thing you'll need to do is set up a reference to the LinqToTwitter.dll. From the Query menu, select query ......

Posted On Thursday, February 24, 2011 11:31 AM

LINQ to Twitter v2.0.8 Released
Today, I released LINQ to Twitter v2.0.8. Besides normal maintenance, this release includes the Twitter Geo API and the Suggested Users API. LINQ to Twitter is hosted on http://linqtotwitter.codepl... In addition to new functionality, I've made much progress toward LINQ to Twitter documentation; primarily in the Making API Calls area: http://linqtotwitter.codepl... There's also a discussion forum where you can ......

Posted On Monday, March 22, 2010 1:46 PM

Extracting StatusID from LINQ to Twitter Search Results
The Twitter Search API returns an XML Atom formatted feed. So, in LINQ to Twitter, I've created an Atom object, which I return when someone performs a search. The problem with the results is that the ID of the Status is mangled with other information. To solve this problem, you need to extract the status ID from the number following the last colon of the ID from the search Entry. Here's some code to show how it's done: private static void SearchAndUseStatusTwitterDe... twitterCtx) { ......

Posted On Monday, February 1, 2010 9:46 PM

Extensibility in LINQ to Twitter: Raw Queries
Today, I added a new extensibility feature to LINQ to Twitter, called Raw Queries. The Twitter API has historically changed suddenly and without warning, leaving 3rd party libraries, such as LINQ to Twitter deficient in full support. On occasion, LINQ to Twitter encounters bugs that leave users without a means for accomplishing specific tasks. Therefore, we need work arounds to allow users to quickly adapt to changes and new features. Raw queries include two points of extensibility: the ability to ......

Posted On Saturday, October 2, 2010 8:50 PM

Modifying Service URLs with LINQ to Twitter
It’s funny that two posts so close together speak about flexibility with the LINQ to Twitter provider. There are certain things you know from experience on when to make software more flexible and when to save time. This is another one of those times when I got lucky and made the right choice up front. I’m talking about the ability to switch URLs. It only makes sense that Twitter should begin versioning their API as it matures. In fact, most of the entire API has moved to the v1 URL at “”, ......

Posted On Thursday, April 22, 2010 9:11 PM

Twitter User/Search Feature Header Support in LINQ to Twitter
LINQ to Twitter’s goal is to support the entire Twitter API. So, if you see a new feature pop-up, it will be in-queue for inclusion. The same holds for the new X-Feature… response headers for User/Search requests. However, you don’t have to wait for a special property on the TwitterContext to access these headers, you can just use them via the TwitterContext.ResponseHeaders collection. The following code demonstrates how to access the new X-Feature… headers with LINQ to Twitter: var user = (from ......

Posted On Friday, April 16, 2010 2:32 PM

Using LINQ to Twitter to Get Chirp Conference Password
The first annual Chirp has been scheduled for 14-15 April in San Francisco. Chirp is a conference, sponsored by Twitter, about the Twitter platform. To attend the conference, you'll need to obtain the password by executing the users/show command. There are plenty of tools to help you do this if you have some degree of programming skill. Of course, there is a .NET LINQ provider, LINQ to Twitter, that can help perform this task with ease. In LINQ to Twitter terms, you would ......

Posted On Monday, January 25, 2010 10:55 PM

New Year New Blog
This is a new blog on the first day of the year starting a new decade. The world has changed in the last 10 years and the software development we did in 1999 is much different than the software development we did in 2009. In the same spirit, the next 10 years will see dramatic changes in the way we write software and the platforms that software runs on. Moving from compilers that targeted operating systems to targeting virtual machine platforms as mainstream software engineering was a dramatic change, ......

Posted On Friday, January 1, 2010 8:10 PM

Copyright © Joe Mayo | Powered by: