Twitter API XML Access
I'm playing around with Twitter's API, but I've com开发者_StackOverflow中文版e across something I'm confused about.
I'm trying to get a list of friends/followers from a public profile, and I could get the user IDs in XML with this URL:
http://twitter.com/followers/ids.xml?screen_name=[namehere]
But then I read the documentations on the Twitter API website that says accessing a user's friends/followers requires authentication. If so, then why can I access the url above and get user IDs?
The reason I'm wondering about this is also because I wanted to write a script in python with the python-twitter library, but the twitter.User.GetFriends()
or twitter.User.GetFollowers()
functions return a message saying I have to be authenticated.
Are these inconsistencies from Twitter's part that will be adressed soon? Could I rely on parsing the XML output with a parser instead of the twitter library?
Getting just the IDs of the followers via followers/ids does not require authentication, and neither do the calls to users/show, statuses/friends and statuses/followers. The linked documentation reflects this. My guess is that your python-twitter library, and not Twitter, is requiring you to authenticate, or those library methods are calling users/lookup (which does require authentication) under the hood.
You should be able to click the following links without the need to authenticate:
Some of the timeline methods related to friends and followers, like statuses/home_timeline (for fetching the target user's and her followers' tweets) and statuses/friends_timeline (for fetching the target user's friends' aggregate timeline) do require authentication.
精彩评论