Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a twitter feed via a "username" query?

Tags:

twitter-feed

I currently have the following URL but it searchs for a keyword rather than just the users feed.

http://search.twitter.com/search.atom?q=from%3AUSERNAME

I want my users to be able to provide there username only and a feed be displayed on their profile.

What url should i use to obtain a users feed including old posts?

like image 861
Andrew Avatar asked Nov 16 '09 21:11

Andrew


1 Answers

I think what you're looking for is:

http://twitter.com/statuses/user_timeline/%USERID%.rss

Where %USERID% is the ID of the user in question.

For example, the url to my own timeline is:

http://twitter.com/statuses/user_timeline/16979198.rss

with 16979198 being my user id number.

UPDATE

According to the Twitter API, you can also do the same with the users username as follows:

http://twitter.com/statuses/user_timeline/%USERNAME%.rss

Where %USERNAME% is the username of the person who's feed you'd like to view.

For example:

http://twitter.com/statuses/user_timeline/jamiedixon.rss

You can also replace the .rss portion of the link with other data types such as .json .atom

For further information on the Twitter API and Timelines, visit here:

http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-user_timeline

like image 161
Jamie Dixon Avatar answered Sep 30 '22 17:09

Jamie Dixon