Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I am currently working on requirement
To get all the tweets and retweets for my account to the database.

To do this-Can any one guide me using asp.net
1. Do I need to use Oauth authorization to get all tweets for my user account?

2. How to get ALL(1000) the tweets for the first time when I access the account?
I used the below method- which returns only 20 recent tweets-How do I get tweets entered fro 2011?
XmlReader reader = XmlReader.Create(string.Format("http://search.twitter.com/search.atom?q={0}", name));
SyndicationFeed feed = SyndicationFeed.Load(reader);
3. How to get the tweets and the retweets with parent id?
In the above method how do I recognize the retweets and their parent ID's so I can identify the retweets of tweet?
Posted
Updated 10-Sep-12 4:46am
v2
Comments
bbirajdar 10-Sep-12 3:04am    
What are your efforts? Have you tried anything? If you have any specific issues then post here . Otherwise post the requirement here
Travelthrprog 10-Sep-12 10:48am    
Thank you for your immediate response. I have modified the question, it will be great if you could give me more light into the doubts I have.

1 solution

You could just have looked in to the twitter's dev group. Check out the following link:

https://dev.twitter.com/discussions/1157[^]
 
Share this answer
 
Comments
Travelthrprog 10-Sep-12 12:15pm    
Thanks for your response. When I googled it, lot of links were for using third party libraries..
To get all tweets, I found-topsy.com was the best one.

But we don't want to use third party libraries and no oauth..
Now I need to get only the retweets for the given tweet. When I looked at the xml returned, I am not able find the parentid of the retweet.
the next best approach I got was to exclude retweets and then use this
http://api.twitter.com/1/statuses/retweets/:id.format to get the retweets for a given tweet. But this is too many calls. Is there a way to do this in one call?
Karthik. A 10-Sep-12 12:17pm    
Can't you show the retweets "on-demand", say, when the users clicks on "view re-tweets" link / button ? By this, you don't have to fetch all the re-tweets on load and get them only when needed?
Travelthrprog 10-Sep-12 13:16pm    
That is a nice idea. But will not fit in with my scenario, where a admin has to approve tweets and retweets before displaying it in our webpage. So I am trying save it to the database.

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