.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Twitter reader

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :ASP.Net
Dear all,I have writing software Twitter reader by C# and reading from this link http://twitter.com/statuses/friends_timeline.xml , in the first time my soft run very good but since Twitter to change system to authentication account then my soft not work.Code twitter reader I used:        client = new WebClient(); client.Credentials = new NetworkCredential(user, pass); stream = client.OpenRead(APILink); reader = new StreamReader(stream); xml_read = new XmlTextReader(reader); xml_Doc = new XmlDocument(); xml_Doc.Load(xml_read); Please help me this problem.Thanks a lot,My email: kieungocdung@hotmail.com

View Complete Post

More Related Resource Links

Use Camera as Barcode Reader

some important links



reader.getordinal("column_may_not_exist") how to catch the exception?



would any body please help me to catch the exception if the column doesnot exist as my table columns are not static.

sometimes its throwing me indexoutofrange exception as the column doesnot exist

thanks for the help guys

Concurrent Affairs: Reader/Writer Locks and the ResourceLock Library


If multiple threads concurrently execute code that writes to or modifies a resource, then obviously the resource must be protected with a thread synchronization lock to ensure that the resource doesn't get corrupted.

Jeffrey Richter

MSDN Magazine June 2006

Editor's Note: Reader E-mail


Here at MSDN Magazine, we get a lot of mail from readers. As you can imagine, much of it involves fulsome praise for our content, our eye-catching covers, or the handsome photo that now graces this page.

Joshua Trupin

MSDN Magazine June 2005

Linq2Sql error: "Invalid attempt to call Read when reader is closed."


I've read up on this error from other posts and on other sites, but haven't found a solid resolution to the issue yet. My setup is as follows:

I have a RepositoryBase class that fields certain db calls that all repositories need to perform. In one such call, "GetSecurityGroup", it works most of the time, but will seemingly at random throw an exception with the error "Invalid attempt to call Read when reader is closed." All other Repository classes inherit from this one, and they all use the same DataContext object, which I understand isn't thread safe. Since there could be multiple calls to the DataContext object on the same page, perhaps one is using the DataContext when the next tries to do so. I'm not sure. What can I do to ensure this doesn't happen?

Where can I find the code of the Twitter or Facebook or WebGrid helpers?


Just in general, where can I find the code to take a look at and learn from them? Or at least look at the functions available to me as I do get the feeling that the insufficient documentation at the moment reveals all.

How do I determine null with ADO reader?

I am using ADO reader to read rows in a table with matching values in two columns.  But when the reader has rows and one of the columns in a row is null instead of a long number, I get an error when I attempt to access the value.  In C# language, I have a statement that says "if (reader["Example"] != null) ExampleID = (long)reader["Example"];".  Unfortunately, the "if" statement does not detect the null value in the column and it attempts to store null in the "ExampleID" long variable and an error states "Specified cast is not valid.  When casting from a number, the value must be a number less than infinity."  What should I do to prevent accessing a null value?   Maurice

Data Reader Destination issue

Hi, I'm new to BI, I created a package to test the data reader destination the dtsx is executing well every thing is green but what after that. The question is how to use this Data reader destination? As I know as a .net programmer there  is a class named data reader that could be used to retieve data in connected mode programmatically using a  connection and a command objects, but in the case of data reader destination how to use it. Or am I confusing the data reader that I kno in the ADO .Net with this one used in BIDS  Should I add a script task after the data reader destination or should I consume this data reader within my proper separate code with a dll or an exe that I create as a .Net project ? For instance, two properties are remaquables for me those are locted within the custom proeprties  datareader and  usercomponentdatatype   The complexity resides in the simplicity

Visual Studio asp C#.NEt web application publishing tweet/status on Twitter/Facebook

Hi guysIf you could give me some guidelines It would mean a lot to me. what type of authentication I use, how to do  id from localhost, how to modify web.config file etc 

Twitter - Simple way to show tweets using the API?

I want to display the last 4 tweets on my website.  I've done the following below which works fine but I'd like all of the urls and twitter names in the title to be hyperlinked.  Is parsing the title the best option or is there another approach I should take?Sub GetTweets() Dim xmlDoc = New System.Xml.XmlDocument xmlDoc.Load("http://search.twitter.com/search.atom?q=asp.net&rpp=4") 'create the select the nodes Dim root As System.Xml.XmlElement = xmlDoc.DocumentElement Dim nodeList As System.Xml.XmlNodeList = xmlDoc.GetElementsByTagName("entry") lblTweets.Text = "" Dim uri = "" Dim name = "" Dim title = "" For i As Integer = 0 To nodeList.Count - 1 name = nodeList.Item(i).ChildNodes(9).ChildNodes(0).InnerText name = name.Substring(0, name.IndexOf("(")) uri = nodeList.Item(i).ChildNodes(9).ChildNodes(1).InnerText title = nodeList.Item(i).ChildNodes(3).InnerText lblTweets.Text += String.Format("@<a style='color:#01a54e;' href='{0}' target='_blank'>{1}</a> {2}<br />", _ uri, name, title) Next End Sub

Adding Twitter authentication support to ASP.NET application

In my last posting I introduced my idea about common membership provider for ASP.NET that is able to support multiple authentication providers. Before writing membership provider we need support for some authentication providers to get an better idea how to use them together. In this posting I will introduce you how to use OAuth protocol with Twitter. Before we start . . let me make some important notes and give some advises so you know better what is going on: OAuth is secure open-source authentication API that is used by Twitter and many other providers. You can find out more details about OAuth from their homepage at http://oauth.net/. There is also official specification for OAuth by Internet Engineering Task Force (IETF): The OAuth 1.0 Protocol. To make our sad lives easier there is library for .NET that makes it for us easier to support OAuth and OpenID protocols in our systems. This cool library is called DotNetOpenAuth. This library is also used by stackoverflow and MySpace. We will use the same library, so go and download it before starting with code. You need to register Twitter application. Go to page Twitter's application registration page and register new application. You need consumer key and consumer secret parameters of your application later. Copy "Sign in with Twitter" to some of your web application's folders where other images are. You need

Twitter sucks and must be run by amateurs

I can't say that I've ever known any kind of Web-based service to suck as much as Twitter, yet be as simple and popular. It really boggles the mind. As just a regular user, it can be annoying enough with the constant outages and failures. As a developer, it's even worse. In my case, I put a simple hook in CoasterBuzz to publish links from our news page using our cstr.bz short URL's. At the time, you could do simple authorization, as well as OAuth. Since I wasn't dealing in nuclear secrets, and the .NET libraries for OAuth and/or Twitter were somewhere between weak and non-existent, I took the path of least resistance and did up some basic auth against a super simple RESTful URL. It took all of five minutes. And hey, all the docs said is that they'd support basic auth for a long time (or something to that effect). Then yesterday, I noticed that the publishing is failing. I look at my error logs, and it's 401'ing. I do some looking around to find that they've turned off basic auth. To add insult to injury, I see this on their blog: Fortunately, developers have known about our transition to OAuth since last December, so they've had time to update their apps." Wow, really? Everyone knew? It's news to me. I pushed out my silly stuff in February, and there was no mention anywhere of any intention to discontinue basic auth, or dates or anything else. Lame. So I'm chatt

Log Reader Error: The process could not execute 'sp_repldone/sp_replcounters'

I have transactional replication going between servers A and B. SQL Server 2005 64 bit A is Publisher B is Distributor and Subscriber Now I am getting the following Log reader Agent Error Msg The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011) Get help: http://help/MSSQL_REPL20011 Only one Log Reader Agent or log-related procedure (sp_repldone, sp_replcmds, and sp_replshowcmds) can connect to a database at a time. If you executed a log-related procedure, drop the connection over which the procedure was executed or execute sp_replflush over that connection before starting the Log Reader Agent or executing another log-related procedure. (Source: MSSQLServer, Error number: 18752) Get help: http://help/18752 The process could not set the last distributed transaction. (Source: MSSQL_REPL, Error number: MSSQL_REPL22017) Get help: http://help/MSSQL_REPL22017 The process could not execute 'sp_repldone/sp_replcounters' on 'A'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037) Get help: http://help/MSSQL_REPL22037 Can anybody help me in solving this issue? I read that we have to delete the existing publication and subscription.  Is there any way to solve this problem without deleting the existing subscription and publication Any help would be appreciated Thanks

Twitter API...help!!

Hi,I was trying to use Twitter API but was stuck at first step itself i.e., while requesting token. Below is the code I am usingpublic string RequestToken() { string HTTPVerb = "POST"; OAuthBase oab = new OAuthBase(); string ConsumerSecret = "***********************************"; string normalizedURL = ""; string normalizedParams = ""; string ReqUrl = "https://api.twitter.com/oauth/request_token"; Uri ReqUri = new Uri(ReqUrl); //oauth_callback string CallBackURL = "http://localhost:3335/MainWeb/CallBack.aspx"; //oauth_consumer_key string ConsumerKey = "*****************"; //oauth_nonce string UniqueId = oab.GenerateNonce(); //oauth_signature_method string SignMethod = "HMAC-SHA1"; //oauth_timestamp string TimeStamp = oab.GenerateTimeStamp(); //oauth_version string OAuthVersion = "1.0"; string Response =""; string Data = "oauth_callback=" + CallBackURL; Data += "&oauth_consumer_key=" + ConsumerKey; Data += "&oauth_nonce=" + UniqueId; Data += "&am

pdf reader

i want to read a  pdf file how to do it.pls give me code.i am using c#.net.rather than links pls give me code here

Can animation extender be used to replicate Twitter's smooth-scrolling, latest-tweet control?

I'm not going for the exact same control, but if I can find a smart way to automatically/smoothly scroll through text from the database on Timer Tick intervals of 5 seconds... then I can use that as a template. My main idea would be to just dynamically create panels with the text inside of them, then dispose of them when they come towards the bottom of the list... but 3 things stop me 1) it would be a lot of work, 2) when the last panel cycles to the bottom of the display area then how do I make it smoothly disappear? 3) What would I use for the display spot?- a Panel won't work because if its contents exceed the set height, it either just expands to fit it or adds scroll bars. I basically want it to have slideshow functionallity how the images smoothly scroll every few seconds (without the scroll bar), and instead of images I want to use text. Any ideas?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend