DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Sarfraz has posted 5 posts at DZone. You can read more from them at their website. View Full User Profile

Using Twitter via .NET - A Beginner's Guide

  • submit to reddit



Objective :

In this post i will quickly explain how can we interact with Twitter API using .Net code.

Ingredients :

LinqToTwitter, Visual Studio 2010

Recipe :

You may find several popular Dlls on internet that communicate with Twitter. I have used LinqToTwitter & have found it easy to understand & implement.

You need to have “twitterConsumerKey” & “twitterConsumerSecret” that you will use from within your application. Get your applications twitter credentials from

.NET code

Create a simple web application in visual studio 2010.

Web.Config Changes

Add following in your web.config appSettings

<add key=”twitterConsumerKey” value=”twitterConsumerKey“/>

<add key=”twitterConsumerSecret” value=”twitterConsumerSecret“/>


Add following namespace in your code file.

using LinqToTwitter;

Refer Code Snippet.


Engr Ubaid Masood replied on Thu, 2014/02/06 - 10:47pm


This is great informative and helpful blog , thanks for sharing

Ievent Security
follow us :

Sevgi Kour replied on Fri, 2013/07/05 - 12:26am

Provided that you are new to Twitter, this will get you up and running quick. Assuming that you know somebody who needs a little assistance or cause kicking off, send them a connection to this post.  pandagoodbacklinks 

Dan Rios replied on Fri, 2013/05/03 - 12:03pm