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

1

5

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?

Dissipate answered 16/11, 2009 at 21:16 Comment(0)
S
20

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

Sellars answered 16/11, 2009 at 21:18 Comment(5)
I'm aware of that one but i dont think many people know there id and id prefer if they can use there username , or is that not a good idea? Thanks in advanceDissipate
legend :) was hoping it would be that easy just everywhere i've looked it related to the users id / number!! Cheers fellaDissipate
It doesn't have to be their UID, their username works as well.Paediatrics
Tried and tested. I;m using it along with magpie rss. Works a treat. @Jamie +1 chappy :)Dissipate
THIS SOLUTION DOES NOT WORK ANYMORE AS TWITTER RETURNS 404 ERROR.Plain

© 2022 - 2024 — McMap. All rights reserved.