Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to develop an application that uses twitter data to find the location of influenza affected area. The public tweets containing keyword like 'flu','influenza',etc with Geo-location are needed to be retrieved.
If someone can help to retrieve tweets from twitter API using Asp.net C#.
Posted

Did you have a look at the Twitter API:

https://dev.twitter.com/rest/public/search[^]

I would personally use the default rest API from the client side. However, if you want to use the managed C# code, there are some good open libraries available on internet.

Take a look at this one for e.g.

https://github.com/danielcrenna/tweetsharp[^]
 
Share this answer
 
Since you're using ASP.NET, why not use the default/built-in function of ASP.NET's twitter helper?

This[^] page has almost most of the concepts explained for users using the twitter helper.

For example you can search for content using this code and show the relevant tweets on the web page you're having.

C#
// flu, and widget ID (I guess)
@Twitter.Search("#flu", "370310477957435392")


Since we're not sure what the second parameter is meant for, you can omit it, ASP.NET team says,

Quote:
Not all of the parameters shown below are required. The optional parameters are used to customize how the button or widget is displayed.


Read more on the page I have attached.
 
Share this answer
 
Comments
Manas Bhardwaj 3-Nov-14 11:56am    
+5 for the Twitter Helper reference.

However, I would still prefer to use client side REST APIs to keep it platform independent.
Afzaal Ahmad Zeeshan 4-Nov-14 0:56am    
Thanks.

Yes, everyone has their own perspective and since I have never used that one so I didn't know of any method like that. Thanks for your tip too. +5 for your method.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900