[twitter-dev] twitter encoding problem
hey all, i am trying to send twitter status over my web site but having some encoding problems, i can not see turkish characters, i use a code snippet like this : var sText = http://www.twitter.com/home?status=; + document.title + ':' + location.href; window.open(sText); //document.title shows my page's title and location.href is a link to my page do you have any idea ? how can i solve my encoding problems? thanks in advance. ps:i had tried using encodeURIComponent method with title part but it did not work
[twitter-dev] still confused about how many user I can follow
Once you’ve followed 2000 users, there are limits to the number of additional users you can follow: this limit is different for every user and is based on your ratio of followers to following It is not very clearly document by twitter help document. Can someone give more info about how to calculate how many users I can follow for my account( 2001 following, 883 follower)? When I want to follow more guys, it gives me an error message. I need to implement this algorithm to my program. Thanks for your help in advance. Thanks Allan Zhang
[twitter-dev] Re: 502 error for public timeline
This is getting out of hand, I am getting 10 a minute. I guess it is time to write that back off code that I figured would not be needed on the public timeline. -- Scott * If you contact me off list replace talklists@ with scott@ * On Oct 19, 2009, at 3:06 PM, Michael Steuer wrote: I've been seeing fail whales on the site as well.. Something must be going on... On 10/19/09 3:03 PM, Scott Haneda talkli...@newgeo.com wrote: I am calling the public timeline once every 60 seconds. Today has been a bad day, 26 total 502 errors since 12:21 PST to now. http public timeline is fine on the website. Any ideas when this is going to be resolved, or if it is even something that Twitter is aware of? If not, heads up :)
[twitter-dev] Re: still confused about how many user I can follow
Yeah. The documentation is sketchy. I wasn't able to fine anything definitive from Twitter: http://help.twitter.com/forums/10711/entries/68916 Additional limits if you are following 2000 or more people: The rules about aggressive following and follow churn still apply. In addition, every user can follow 2000 people total. Once you’ve followed 2000 users, there are limits to the number of additional users you can follow: this limit is different for every user and is based on your ratio of followers to following. Others have described the ratio as 10% more than you are currently following: http://www.using-twitter.com/blog/twitters-2000-follower-limit/ So, the limit of following 2,000 people was contrived as a mechanism to prevent follow spamming. Once you have around 1,800 followers you can start following 10% followers more than are currently following you. So, at 2,000 followers following you, you can follow a total of 2,200 people on Twitter. Leon On Oct 19, 10:40 pm, Allan Zhang all...@gmail.com wrote: Once you’ve followed 2000 users, there are limits to the number of additional users you can follow: this limit is different for every user and is based on your ratio of followers to following It is not very clearly document by twitter help document. Can someone give more info about how to calculate how many users I can follow for my account( 2001 following, 883 follower)? When I want to follow more guys, it gives me an error message. I need to implement this algorithm to my program. Thanks for your help in advance. Thanks Allan Zhang
[twitter-dev] Re: twitter encoding problem
Hi. I dont think the syntax is right for what you are trying to do. The window.open() syntax is as follows: window.open (URL, windowTitle); Combining this into one string as you have done causes all this to be interpreted as a parameters to Twitter status method, which is not what you intended. And since these are not valid parameters to the status method, you'll probably have errors too. Try the following: var strTwitterApi = 'http://twitter.com/statuses/user_timeline.xml' or var strTwitterApi = 'http://twitter.com/statuses/ user_timeline.rss' or var strTwitterApi = 'http://twitter.com/your username' Then window.open (strTwitterApi, 'Document Title or whatever'); Leon On Oct 20, 12:16 am, sa sadullahke...@gmail.com wrote: hey all, i am trying to send twitter status over my web site but having some encoding problems, i can not see turkish characters, i use a code snippet like this : var sText = http://www.twitter.com/home?status=; + document.title + ':' + location.href; window.open(sText); //document.title shows my page's title and location.href is a link to my page do you have any idea ? how can i solve my encoding problems? thanks in advance. ps:i had tried using encodeURIComponent method with title part but it did not work
[twitter-dev] Re: twitter encoding problem
hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this: http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea? On Tue, Oct 20, 2009 at 11:23 AM, leonspencer spencer_l...@yahoo.comwrote: Hi. I dont think the syntax is right for what you are trying to do. The window.open() syntax is as follows: window.open (URL, windowTitle); Combining this into one string as you have done causes all this to be interpreted as a parameters to Twitter status method, which is not what you intended. And since these are not valid parameters to the status method, you'll probably have errors too. Try the following: var strTwitterApi = 'http://twitter.com/statuses/user_timeline.xml' or var strTwitterApi = 'http://twitter.com/statuses/ user_timeline.rss' or var strTwitterApi = 'http://twitter.com/your username' Then window.open (strTwitterApi, 'Document Title or whatever'); Leon On Oct 20, 12:16 am, sa sadullahke...@gmail.com wrote: hey all, i am trying to send twitter status over my web site but having some encoding problems, i can not see turkish characters, i use a code snippet like this : var sText = http://www.twitter.com/home?status=; + document.title + ':' + location.href; window.open(sText); //document.title shows my page's title and location.href is a link to my page do you have any idea ? how can i solve my encoding problems? thanks in advance. ps:i had tried using encodeURIComponent method with title part but it did not work
[twitter-dev] Re: twitter encoding problem
Thanks for the clarification. Are you updating your Twitter status to read: i am reading this: http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this:http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Re: twitter encoding problem
i have a share on twitter button , when user click this button http://twitter.com/ page will be open and the info that i send (i am reading this: http://www.mypage.com/article.aspx;) will be shown in the What Are you Doing? textbox and then user will click update button on twitter page. On Tue, Oct 20, 2009 at 11:46 AM, leonspencer spencer_l...@yahoo.comwrote: Thanks for the clarification. Are you updating your Twitter status to read: i am reading this: http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this: http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Re: twitter encoding problem
by the way, is there any way to update user's status directly without opening the twitter page? or have i just misunderstood you? 2009/10/20 sadullah keleş sadullahke...@gmail.com i have a share on twitter button , when user click this button http://twitter.com/ page will be open and the info that i send (i am reading this: http://www.mypage.com/article.aspx;) will be shown in the What Are you Doing? textbox and then user will click update button on twitter page. On Tue, Oct 20, 2009 at 11:46 AM, leonspencer spencer_l...@yahoo.comwrote: Thanks for the clarification. Are you updating your Twitter status to read: i am reading this: http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this: http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Re: twitter encoding problem
Thanks. I was unfamiliar with that mechanism. Cool. So that's how it is done? Did you try encodeURIComponent() to the Turkish characters are handled correctly? Leon On Oct 20, 1:56 am, sadullah keleş sadullahke...@gmail.com wrote: i have a share on twitter button , when user click this buttonhttp://twitter.com/ page will be open and the info that i send (i am reading this:http://www.mypage.com/article.aspx;) will be shown in the What Are you Doing? textbox and then user will click update button on twitter page. On Tue, Oct 20, 2009 at 11:46 AM, leonspencer spencer_l...@yahoo.comwrote: Thanks for the clarification. Are you updating your Twitter status to read: i am reading this:http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this: http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Re: twitter encoding problem
Yeah, through the Twitter API OAuth. But for what you are doing, your method is more practical. From: sadullah keleş sadullahke...@gmail.com To: twitter-development-talk@googlegroups.com Sent: Tue, October 20, 2009 2:00:09 AM Subject: [twitter-dev] Re: twitter encoding problem by the way, is there any way to update user's status directly without opening the twitter page? or have i just misunderstood you? 2009/10/20 sadullah keleş sadullahke...@gmail.com i have a share on twitter button , when user click this button http://twitter.com/ page will be open and the info that i send (i am reading this: http://www.mypage.com/article.aspx;) will be shown in the What Are you Doing? textbox and then user will click update button on twitter page. On Tue, Oct 20, 2009 at 11:46 AM, leonspencer spencer_l...@yahoo.com wrote: Thanks for the clarification. Are you updating your Twitter status to read: i am reading this: http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this:http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Re: twitter encoding problem
:) actually this is my first try on twitter i am not familiar with this either. using javascript's encoding functions did not work. probably in the end i will replace turkish characters with their similar characters in english :) On Tue, Oct 20, 2009 at 12:03 PM, leonspencer spencer_l...@yahoo.comwrote: Thanks. I was unfamiliar with that mechanism. Cool. So that's how it is done? Did you try encodeURIComponent() to the Turkish characters are handled correctly? Leon On Oct 20, 1:56 am, sadullah keleş sadullahke...@gmail.com wrote: i have a share on twitter button , when user click this buttonhttp:// twitter.com/ page will be open and the info that i send (i am reading this:http://www.mypage.com/article.aspx;) will be shown in the What Are you Doing? textbox and then user will click update button on twitter page. On Tue, Oct 20, 2009 at 11:46 AM, leonspencer spencer_l...@yahoo.com wrote: Thanks for the clarification. Are you updating your Twitter status to read: i am reading this:http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this: http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Re: twitter encoding problem
Yeah. It works fine on my end for Turkish characters and using the JavaScript encodeURIcomponent method on the query string. But since it isnt a Twitter API issue But keep trying. Maybe someone else can chime in. Leon From: Leon Spencer spencer_l...@yahoo.com To: twitter-development-talk@googlegroups.com Sent: Tue, October 20, 2009 2:23:03 AM Subject: [twitter-dev] Re: twitter encoding problem Shouldn't be a problem unless there is some Twitter bug. Twitter should handle everything utf-8 as long as within 140 char limit. I tried the following without problems: [original url] http://twitter.com/home?status=Currently reading on Webgrrls:ü ü ü ü ü [encoded url] http://twitter.com/home?status=Currently+reading+on+Webgrrls%3a%c3%bc+%c3%bc+%c3%bc+%c3%bc+%c3%bc Leon From: sadullah keleş sadullahke...@gmail.com To: twitter-development-talk@googlegroups.com Sent: Tue, October 20, 2009 2:10:14 AM Subject: [twitter-dev] Re: twitter encoding problem :) actually this is my first try on twitter i am not familiar with this either. using javascript's encoding functions did not work. probably in the end i will replace turkish characters with their similar characters in english :) On Tue, Oct 20, 2009 at 12:03 PM, leonspencer spencer_l...@yahoo.com wrote: Thanks. I was unfamiliar with that mechanism. Cool. So that's how it is done? Did you try encodeURIComponent() to the Turkish characters are handled correctly? Leon On Oct 20, 1:56 am, sadullah keleş sadullahke...@gmail.com wrote: i have a share on twitter button , when user click this buttonhttp://twitter.com/ page will be open and the info that i send (i am reading this:http://www.mypage.com/article.aspx;) will be shown in the What Are you Doing? textbox and then user will click update button on twitter page. On Tue, Oct 20, 2009 at 11:46 AM, leonspencer spencer_l...@yahoo.comwrote: Thanks for the clarification. Are you updating your Twitter status to read: i am reading this:http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this: http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Re: [twitter-api-announce] Draft of List API documentation
Hey Marcel, Another 2 methods I'd like to see added to the list api - a way to get the id's of all current members (all 500), and a way to get the id's of all current subscribers - cursor based with as many per 'page' as possible. Cheers, Tim. On Fri, Oct 16, 2009 at 8:04 PM, Marcel Molina mar...@twitter.com wrote: Hey folks. As some of you have likely read we're starting to do some private beta testing of our new lists feature. We're not quite ready to open it up to everyone but we've made some headway on the API and wanted to share some details of what we've got so far. There are a handful of things on our todo lists so don't consider this signed and sealed just yet. You may notice this API is a bit of a departure from the rest of the API. It's a bit more, errr, REST than the rest. First off, here's the current payload for a list: ?xml version=1.0 encoding=UTF-8? list id1416/id nametall people/name full_name@noradio/tall-people/full_name slugtall-people/slug subscriber_count0/subscriber_count member_count3/member_count uri/noradio/tall-people/uri modepublic/mode user id3191321/id nameMarcel Molina/name screen_namenoradio/screen_name locationSan Francisco, CA/location descriptionEngineer at Twitter on the @twitterapi team, obsessed with rock climbing amp; running. In a past life I was a member of the Rails Core team./description profile_image_url http://a3.twimg.com/profile_images/53473799/marcel-euro-rails-conf_normal.jpg /profile_image_url urlhttp://project.ioni.st/url protectedfalse/protected followers_count40059/followers_count profile_background_color9AE4E8/profile_background_color profile_text_color33/profile_text_color profile_link_color0084B4/profile_link_color profile_sidebar_fill_colorDDFFCC/profile_sidebar_fill_color profile_sidebar_border_colorBDDCAD/profile_sidebar_border_color friends_count354/friends_count created_atMon Apr 02 07:47:28 + 2007/created_at favourites_count131/favourites_count utc_offset-28800/utc_offset time_zonePacific Time (US amp; Canada)/time_zone profile_background_image_url http://a1.twimg.com/profile_background_images/18156348/jessica_tiled.jpg.jpeg /profile_background_image_url profile_background_tiletrue/profile_background_tile statuses_count3472/statuses_count notificationsfalse/notifications geo_enabledtrue/geo_enabled verifiedfalse/verified followingfalse/following /user /list === Lists === POST '/:user/lists.:format' Creates a new list for the authenticated user. Parameters: * name: the name of the list. (required) * mode: whether your list is public of private. Values can be 'public' or 'private'. Public by default if not specified. (optional) Usage notes: :user in the url should be the screen name of the user making the request to create the list Supported formats: xml, json e.g. curl -u USERNAME:PASSWORD -d name=tall peoplemode=private http://twitter.com/noradio/lists.xml POST/PUT '/:user/lists/:list_slug.:format' Updates the specified list. Takes the same parameters as the create resource at POST '/:user/lists.:format' (:name and :mode). Supported formats: xml, json e.g. curl -u USERNAME:PASSWORD -d name=giantsmode=public http://twitter.com/noradio/lists/tall-people.xml GET '/:user/lists.:format' Lists your lists. Supported format: xml, json e.g. curl -u USERNAME:PASSWORD http://twitter.com/noradio/lists.xml GET '/:user/lists/memberships.:format' List the lists the specified user has been added to. Supported formats: xml, json e.g. curl -u USERNAME:PASSWORD http://twitter.com/noradio/lists/memberships.xml DELETE '/:user/lists/:list_slug.:format' Delete the specified list owned by the authenticated user. Parameters: * list_slug: the slug of the list you want to delete. (required) Supported formats: xml, json e.g. curl -u USERNAME:PASSWORD -X DELETE http://twitter.com/noradio/lists/tall-people.xml GET '/:users/lists/:list_slug/statuses.:format' Show tweet timeline for members of the specified list. Parameters: * list_slug: the slug of the list you want the member tweet timeline of. (required) * next/previous_cursor: used to page through results (optional) Supported formats: xml, json e.g. curl -u USERNAME:PASSWORD http://twitter.com/noradio/lists/tall-people/statuses.xml GET '/:users/lists/:list_slug.:format' Show a specific list you can use the new resource. Supported formats: xml, json e.g. curl -u USERNAME:PASSWORD http://twitter.com/noradio/lists/tall-people.xml === List members === POST '/:user/:list_slug/members.:format' Add a member to a list. Parameters: * id: the id of the user you want to add as a member to the list. (required) Usage notes: The :list_slug portion of the request path should be the slug of the list you want to add a member to. Supported formats: xml, json e.g.
[twitter-dev] Re: still confused about how many user I can follow
Rather than trying to guess how this works and then playing a cat and mouse game with Twitter whenever they change it, why not handle the error response? Richard On Oct 20, 6:40 am, Allan Zhang all...@gmail.com wrote: Once you’ve followed 2000 users, there are limits to the number of additional users you can follow: this limit is different for every user and is based on your ratio of followers to following It is not very clearly document by twitter help document. Can someone give more info about how to calculate how many users I can follow for my account( 2001 following, 883 follower)? When I want to follow more guys, it gives me an error message. I need to implement this algorithm to my program. Thanks for your help in advance. Thanks Allan Zhang
[twitter-dev] Re: twitter encoding problem
i am sorry for delay Leon, it was lunch time :) i am still having same problem,may be it could be related to my page encoding settings, i will keep on searching, i hope i can solve :) thanks again for your helps , have a nice day On Tue, Oct 20, 2009 at 12:33 PM, Leon Spencer spencer_l...@yahoo.comwrote: Yeah. It works fine on my end for Turkish characters and using the JavaScript encodeURIcomponent method on the query string. But since it isnt a Twitter API issue But keep trying. Maybe someone else can chime in. Leon -- *From:* Leon Spencer spencer_l...@yahoo.com *To:* twitter-development-talk@googlegroups.com *Sent:* Tue, October 20, 2009 2:23:03 AM *Subject:* [twitter-dev] Re: twitter encoding problem Shouldn't be a problem unless there is some Twitter bug. Twitter should handle everything utf-8 as long as within 140 char limit. I tried the following without problems: [original url] http://twitter.com/home?status=Currently reading on Webgrrls:ü ü ü ü ü [encoded url] http://twitter.com/home?status=Currently+reading+on+Webgrrls%3a%c3%bc+%c3%bc+%c3%bc+%c3%bc+%c3%bc Leon -- *From:* sadullah keleş sadullahke...@gmail.com *To:* twitter-development-talk@googlegroups.com *Sent:* Tue, October 20, 2009 2:10:14 AM *Subject:* [twitter-dev] Re: twitter encoding problem :) actually this is my first try on twitter i am not familiar with this either. using javascript's encoding functions did not work. probably in the end i will replace turkish characters with their similar characters in english :) On Tue, Oct 20, 2009 at 12:03 PM, leonspencer spencer_l...@yahoo.comwrote: Thanks. I was unfamiliar with that mechanism. Cool. So that's how it is done? Did you try encodeURIComponent() to the Turkish characters are handled correctly? Leon On Oct 20, 1:56 am, sadullah keleş sadullahke...@gmail.com wrote: i have a share on twitter button , when user click this buttonhttp:// twitter.com/ page will be open and the info that i send (i am reading this:http://www.mypage.com/article.aspx;) will be shown in the What Are you Doing? textbox and then user will click update button on twitter page. On Tue, Oct 20, 2009 at 11:46 AM, leonspencer spencer_l...@yahoo.com wrote: Thanks for the clarification. Are you updating your Twitter status to read: i am reading this:http://www.mypage.com/article.aspx; or are you just trying to display this information in a new browser window without updating your Twitter status? Thanks, Leon On Oct 20, 1:38 am, sadullah keleş sadullahke...@gmail.com wrote: hey leonspencer, thanks for your reply. dont think title part as page title, it is just a short explanation. what i am trying to do is like i am reading this: http://www.mypage.com/article.aspx;, i mean at the beginning of the status a short explanation and after that, link to the page, explanation part will be taken from page title. this does not encounter any error, works properly except turkish characters :) any other idea?
[twitter-dev] Where is the Twitter WADL?
Hi All, I am keen to start implementing a Twitter Web Service application but I can't find any published WADL in the Twitter API docs. My IDE (NetBeans) contains a partial API WADL but I can't find the full API anywhere. Could someone please point me in the direction of this? I'm suprised it's so hard to find. Many thanks, Edd
[twitter-dev] Streaming Api
Hey I would like to connect to twitter streaming using the api and I would like to do it using c# I already read the documentation on the twitter web site and still have no idea how to connect any help would be greatly appreciated
[twitter-dev] Perl OAuth - updated example
I found an issue using the server example included in Net::Twitter (oauth_webapp.pl). Every time someone connected with the server, it re-used the same OAuth token, until they actually signed up with the app. Well, not everyone, once they've gone to the authorization URL, actually signs up, so fairly quickly, the token becomes stale, and then no-one can sign up. My fault for having an app no-one wants to use, perhaps... It's possible it was just me, but in case anyone else has the same issue, I've posted an updated example at http://tags.linkky.com/oauth_webapp.pl It exists only to authenticate (I've taken out the last tweet subroutine as the cookies are now gone), and to add the access tokens to a MySQL DB - Obviously, it can be updated to include any storage method Nigel http://tags.linkky.com
[twitter-dev] Re: 502 error for public timeline
Slightly off topic, but why are you calling the public timeline 10 times a minute? It's only updated once every 30 seconds. If you want more public statuses, you should be using the Streaming API. -John Kalucki http://twitter.com/jkalucki Services, Twitter Inc. On Oct 20, 12:44 am, Scott Haneda talkli...@newgeo.com wrote: This is getting out of hand, I am getting 10 a minute. I guess it is time to write that back off code that I figured would not be needed on the public timeline. -- Scott * If you contact me off list replace talklists@ with scott@ * On Oct 19, 2009, at 3:06 PM, Michael Steuer wrote: I've been seeing fail whales on the site as well.. Something must be going on... On 10/19/09 3:03 PM, Scott Haneda talkli...@newgeo.com wrote: I am calling the public timeline once every 60 seconds. Today has been a bad day, 26 total 502 errors since 12:21 PST to now. http public timeline is fine on the website. Any ideas when this is going to be resolved, or if it is even something that Twitter is aware of? If not, heads up :)
[twitter-dev] Re: C# + OAuth + account/update_profile_image = 500 Internal Server Error
Thanks Thomas... I did look at TwitterVB as a possible way to find the answer to this particular function call... but the API says it doesn't yet cover account/updateprofileimage... Thanks Simon On Oct 19, 3:39 pm, Thomas Hübner thueb...@gmx.de wrote: You can use TwitterVB which covers nearly the complete API in .NET (OAuth included). U find it on codeplexhttp://twittervb.codeplex.com/ Cheers, Thomas Nicholas Granado schrieb: Simon, You would sign the request with all of the usual oauth param suspects. If I recall correctly this endpoint has no other params other than the 'image' param in the multi-part post body whose value would be the bytes of the image file. Typically I've only seen the post params passed into the oauth signing rigmarole when the post body is urlencoded. I hope this helps, this whole OAuth thing can be very confusing at first glance. If you are in C# I have my own lib for twitter basic auth/oauth that I've baked up, if you like I could pass you the bits. Nicholas --- Nicholas Granado email: ngran...@gmail.com mailto:ngran...@gmail.com twitter: heatxsink web:http://nickgranado.com On Mon, Oct 19, 2009 at 6:38 AM, Zaudio si...@z-audio.co.uk mailto:si...@z-audio.co.uk wrote: Nicholas, That's great feedback! In you opinion, how do I then sign the request? Do I use all the usual for the signaturebase... ie postmethodurlnonceetc etc or just postmethodurl as David suggested? I trust that the image data does not come into the signing process, and that I still can post the data using iso-8859-1 encoding as I would normally do for uploading files? If you have these answers, then I should be able to nail this for our .net case.Oauth's been working great for us until this hitch... Thanks Simon On Oct 18, 6:11 pm, Nicholas Granado ngran...@gmail.com mailto:ngran...@gmail.com wrote: Simon, I believe the body of your post might be incorrect. It should look like this: POST /account/update_profile_image.xml HTTP/1.1 Content-Type: multipart/form-data; boundary=8cbed79c91b24f3 Host: twitter.com http://twitter.com Content-Length: 3863(this will probably change now..) --8cbed79c91b24f3 Content-Disposition: form-data; name=image; filename=test.jpg Content-Type: image/jpeg (there's a few K of binary data here, the contents of the file) --8cbed79c91b24f3 The rest of the OAuth variables should be passed on the query string. I hope this helps. Cheers, Nicholas --- Nicholas Granado email: ngran...@gmail.com mailto:ngran...@gmail.com twitter: heatxsink web:http://nickgranado.com On Sun, Oct 18, 2009 at 2:42 PM, Zaudio si...@z-audio.co.uk mailto:si...@z-audio.co.uk wrote: Hi David, I found your excellent post hoping that it would solve the same challenge for my app: updating profile image via Oauth... using similar .net base to yourself... BUT I just get the 401 all the time... despite taking your advice to just sign with the HTTPmethod URL My post data is laid out much like yours... though I never got that 500 error... I've tried all sorts... dropping the off the end different encodings... What encoding did you use to encode your image, and then to post the request? Does it still work for you... or did this get broken when Twitter 'fixed' their Oauth implementation? Can anyone else advise if they have got this working and where I might be going wrong? Thanks Simon (Zaudio) On Aug 19, 11:40 pm, David Carson carson63...@gmail.com mailto:carson63...@gmail.com wrote: Got this sorted out and working, and thought I should share the two pitfalls which were causing me problems. First of all, unbelievably, the 500 Internal Server Error was being caused by an extra carriage return between my last HTTP header and the first multipart boundary. Seriously. I had two blank lines in there instead of one. Removed the extra carriage return, and my 500 vanished, being replaced by a more reasonable (401) Unauthorized - Incorrect signature error. Secondly, the OAuth documentation seems a bit shaky when it comes to multipart/form-data POSTs. But basically, you do NOT use any of the POST parameters when creating your signature. And this includes all of the OAuth-specific parameters like oauth_consumer_key, oauth_signature_method, etc. Bit of a security hole imho, OAuth
[twitter-dev] Re: C# + OAuth + account/update_profile_image = 500 Internal Server Error
Hi Nicholas, Sounds like you have this particular method cracked (account/ updateprofileimage) in Oauth Our code does use C# for all twitter layers... And thanks for your offer.. all I'm really after is the logic to get the correctly signed POST for this method... You seem to suggest I don't need to sign the image data as it is not urlencoded... So I'll try from there. If you can send me snippets that show the logic to make this work... that might help. Thanks again Simon On Oct 19, 8:32 am, Nicholas Granado ngran...@gmail.com wrote: Simon, You would sign the request with all of the usual oauth param suspects. If I recall correctly this endpoint has no other params other than the 'image' param in the multi-part post body whose value would be the bytes of the image file. Typically I've only seen the post params passed into the oauth signing rigmarole when the post body is urlencoded. I hope this helps, this whole OAuth thing can be very confusing at first glance. If you are in C# I have my own lib for twitter basic auth/oauth that I've baked up, if you like I could pass you the bits. Nicholas --- Nicholas Granado email: ngran...@gmail.com twitter: heatxsink web:http://nickgranado.com On Mon, Oct 19, 2009 at 6:38 AM, Zaudio si...@z-audio.co.uk wrote: Nicholas, That's great feedback! In you opinion, how do I then sign the request? Do I use all the usual for the signaturebase... ie postmethodurlnonceetc etc or just postmethodurl as David suggested? I trust that the image data does not come into the signing process, and that I still can post the data using iso-8859-1 encoding as I would normally do for uploading files? If you have these answers, then I should be able to nail this for our .net case.Oauth's been working great for us until this hitch... Thanks Simon On Oct 18, 6:11 pm, Nicholas Granado ngran...@gmail.com wrote: Simon, I believe the body of your post might be incorrect. It should look like this: POST /account/update_profile_image.xml HTTP/1.1 Content-Type: multipart/form-data; boundary=8cbed79c91b24f3 Host: twitter.com Content-Length: 3863(this will probably change now..) --8cbed79c91b24f3 Content-Disposition: form-data; name=image; filename=test.jpg Content-Type: image/jpeg (there's a few K of binary data here, the contents of the file) --8cbed79c91b24f3 The rest of the OAuth variables should be passed on the query string. I hope this helps. Cheers, Nicholas --- Nicholas Granado email: ngran...@gmail.com twitter: heatxsink web:http://nickgranado.com On Sun, Oct 18, 2009 at 2:42 PM, Zaudio si...@z-audio.co.uk wrote: Hi David, I found your excellent post hoping that it would solve the same challenge for my app: updating profile image via Oauth... using similar .net base to yourself... BUT I just get the 401 all the time... despite taking your advice to just sign with the HTTPmethod URL My post data is laid out much like yours... though I never got that 500 error... I've tried all sorts... dropping the off the end different encodings... What encoding did you use to encode your image, and then to post the request? Does it still work for you... or did this get broken when Twitter 'fixed' their Oauth implementation? Can anyone else advise if they have got this working and where I might be going wrong? Thanks Simon (Zaudio) On Aug 19, 11:40 pm, David Carson carson63...@gmail.com wrote: Got this sorted out and working, and thought I should share the two pitfalls which were causing me problems. First of all, unbelievably, the 500 Internal Server Error was being caused by an extra carriage return between my last HTTP header and the first multipart boundary. Seriously. I had two blank lines in there instead of one. Removed the extra carriage return, and my 500 vanished, being replaced by a more reasonable (401) Unauthorized - Incorrect signature error. Secondly, the OAuth documentation seems a bit shaky when it comes to multipart/form-data POSTs. But basically, you do NOT use any of the POST parameters when creating your signature. And this includes all of the OAuth-specific parameters like oauth_consumer_key, oauth_signature_method, etc. Bit of a security hole imho, OAuth implements all this complexity to avoid man-in-the-middle or replay attacks, and as soon as you do a multipart POST it's all negated. So, my signature base was literally: POSThttp%3A%2F%2Ftwitter.com%2Faccount%2Fupdate_profile_image.xml Just the HTTP method and the URL. No parameters. Once I made that change to the signature generation, my request went through fine and my avatar changed. Hope this helps
[twitter-dev] from:user and since_id breaking Search API
We have an app that runs searches regularly, and recently stopped receiving new tweets. After investigating we found a search combination that seems to break the search API. Instead of getting a response with no tweets, an .atom request errors and a .json request 404s. http://search.twitter.com/search.json?q=from:silent_tester02since_id=4979161317 http://search.twitter.com/search.atom?q=from:silent_tester02since_id=4979161317 Changing the query to not use from:username works as expect, but I've put several usernames in and they all respond the same way. I haven't managed to narrow down the cause of the problem much further than that, but we're handling it in our code by rescuing any failed searches and appending since: with the date of the most recent tweet to the q. Any thoughts on what might be causing this would be appreciated.
[twitter-dev] API 140 character truncation change?
Has anyone else noticed a change in the way that the 140 character limit is enforced via the API? I noticed a change sometime between the 13th and the 16th that is now causing all my 140+ character posts to be rejected by the API. As of the 13th and earlier if I posted a 140+ character message to twitter, the urls would be truncated using bit.ly, and then if they were still over 140 characters an ellipsis would be added to the end of the message, and by clicking on the ellipsis you could see the entirety on the message. I have a service that posts to twitter, and in the messages it contains links. My service aims to be under 140 characters once the url(s) are shortened by twitter, however none of my posts are going through now. Also a side note is that the api is not returning errors, they return proper responses however they are the proper response for the current status of the account, not the new status that was just attempted to be posted. I am using C# and the Twitterizer API. Has anyone else noticed this, is it a permanent change? a mistake? I am currently trying to learn more about why this happened and what my proper response should be. Thank you
[twitter-dev] Re: 502 error for public timeline
I'm seeing numerous 502's and 500's this morning. Qwest business DSL is the service. Randy
[twitter-dev] Re: Where is the Twitter WADL?
Hi Edd, We may provide a WADL in the future, but right now one is not available. -Chad On Tue, Oct 20, 2009 at 5:33 AM, Edd e...@eddgrant.com wrote: Hi All, I am keen to start implementing a Twitter Web Service application but I can't find any published WADL in the Twitter API docs. My IDE (NetBeans) contains a partial API WADL but I can't find the full API anywhere. Could someone please point me in the direction of this? I'm suprised it's so hard to find. Many thanks, Edd
[twitter-dev] Re: API 140 character truncation change?
This is the new intended behaviour from what I have been told. All tweets 140 in length will be silently ignored. I'm guessing they don't throw an error here yet to not break any existing clients until they have upgraded. Eventually I'm sure we will be some sort of 400 error in the future. For now I'd recommend enforcing the 140 limit in your software and warn the user if it's too long rather than going ahead and posting it. Josh On Tue, Oct 20, 2009 at 9:37 AM, James Tymann jtym...@gmail.com wrote: Has anyone else noticed a change in the way that the 140 character limit is enforced via the API? I noticed a change sometime between the 13th and the 16th that is now causing all my 140+ character posts to be rejected by the API. As of the 13th and earlier if I posted a 140+ character message to twitter, the urls would be truncated using bit.ly, and then if they were still over 140 characters an ellipsis would be added to the end of the message, and by clicking on the ellipsis you could see the entirety on the message. I have a service that posts to twitter, and in the messages it contains links. My service aims to be under 140 characters once the url(s) are shortened by twitter, however none of my posts are going through now. Also a side note is that the api is not returning errors, they return proper responses however they are the proper response for the current status of the account, not the new status that was just attempted to be posted. I am using C# and the Twitterizer API. Has anyone else noticed this, is it a permanent change? a mistake? I am currently trying to learn more about why this happened and what my proper response should be. Thank you
[twitter-dev] 401 Unauthorized -- user_timeline -- using Numeric ID
I have been running into a recurring problem that I have been facing for the past couple of days, on numerous machines. I am extracting 200 tweets for a large number of users, using the numeric user ID (user_id). After a small number of requests (between 10 and 50) I receive nothing but This method requires authentication. Authenticating with my username and password does not make the message go away. I have verified that the users I am trying to pull are not protected users. I have also verified that I am not hitting the rate limit. On my latest attempt, I used an IP I have not used in the past. I was able to extract the first 200 tweets for *12* users, then I started receiving 401s (This method requires authentication) on every single request of this type. After about 10 minutes, I tried again and it worked for about another 15 users, then I started getting the same message as well as other messages including 502. Is this behavior expected? Does this 401 message possibly mean something else?
[twitter-dev] Re: Bug? Updates 140 characters return success with prior update payload
Argh - if twitter is going to reject a dup status, I need to know what it's a dup of, not just the last status. On Oct 19, 2:47 am, Dave Sherohman d...@fishtwits.com wrote: On Sun, Oct 18, 2009 at 04:48:13PM -0700, Naveen wrote: I agree. A silent failure seems like the wrong behavior.. It should return an error if the tweet has failed to post. It's actually relatively benign in this specific case, since you can chop the status text down to 140 characters before submitting it, thus ensuring that it won't be rejected for length. However, Twitter has also gotten a bit more strict with blocking duplicate statuses. While testing my fix for the silently reject over- length status text problem, I was getting a lot of failures when I knew I was sending updates that were under 140 in length. It turned out that any update which was a duplicate of another update sent within the last hour (if not longer) was also being silently rejected in the same manner, even if it was not the same as the user's most recent status. This is not a failure mode which can be reliably anticipated or compensated for prior to submitting the update, therefore Twitter *must* provide some indication in the response that it was rejected. There may also be other circumstances in which an update will silently fail which I haven't yet discovered. My current attempt at working around this is to compare the returned status ID against the highest ID previously seen by my application and, if the returned ID is not greater than the previous highest, reporting that the update was rejected for an unspecified reason. I don't like being unable to tell my users why it failed, but that seems to be the most reliable way of detecting these silent update failures until/ unless Twitter provides notification that the update was rejected and at least a hint as to why. Also this change was made without any announcement that I recall seeing or can find now. This is a pretty significant change in behavior for existing clients.. We are failing to post because people are not getting an error and they believe it is our problem. Agreed. That is a definite problem. -- Dave Sherohman
[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID
Hi Ryan, This sounds like a bug. Can you provide full HTTP request/response headers+body traces for some of these requests? (be sure to obscure the authentication header). Using curl -vvv would be good. -Chad On Tue, Oct 20, 2009 at 1:10 PM, Ryan Rosario uclamath...@gmail.com wrote: I have been running into a recurring problem that I have been facing for the past couple of days, on numerous machines. I am extracting 200 tweets for a large number of users, using the numeric user ID (user_id). After a small number of requests (between 10 and 50) I receive nothing but This method requires authentication. Authenticating with my username and password does not make the message go away. I have verified that the users I am trying to pull are not protected users. I have also verified that I am not hitting the rate limit. On my latest attempt, I used an IP I have not used in the past. I was able to extract the first 200 tweets for *12* users, then I started receiving 401s (This method requires authentication) on every single request of this type. After about 10 minutes, I tried again and it worked for about another 15 users, then I started getting the same message as well as other messages including 502. Is this behavior expected? Does this 401 message possibly mean something else?
[twitter-dev] Re: linespaces / whitespace being removed: bug or feature?
Bump. On 20/10/2009, at 3:54 PM, TjL luo...@gmail.com wrote: http://twitter.com/status/show/5008681027.xml| was entered with newlines between the words. It does not show the newlines. http://twitter.com/status/show/4999223282.xml shows that this was working just a few hours ago. Both were entered on the web. Is this a bug or an intended change?
[twitter-dev] Re: New cursor methods are way too slow
Hi, The reason why I¹m using followers/ids and then users/show is efficiency: I¹m maintaining a local cache of my users social graph. I¹m also maintaining local user objects for my users and for their followers. Since both the social graph and user info are subject to change, both need periodic updating... They way I¹m doing that now is as follows: 1. I request followers/ids for each of my users 2. If I detect new followers I add them to my users social graph / If I detect followers removed, I remove them from my users social graph Subsequently I parse my user object table for users whose: 1. info hasn¹t been updated in X days 2. have no info because they were added as numeric IDs only via the followers/ids method described above I then request users/show for each user matching condition 1 or 2 above. This way, I only get an updated user object for each unique user once, when they¹re first added, or when I expire a previous update to their info. When I get the followers of another new user, chances are I already know the majority of his followers user information. I¹m not using statuses/followers because I would be getting the same information over and over and over and over again... Especially when you¹re talking about users with a lot of followers, it¹s really inefficient considering you probably already store user info on most of the user¹s followers... It would be an equally efficient method if overlap in followers didn¹t exist... Since it does, I believe my approach is more efficient, and faster over time, as your user database grows and your basically just querying the social graph... ALL THAT SAID I would LOVE to have a method that allows me to get user objects in batch... If I could request 100 user objects by numeric id in one API call, the above would be exponentially efficient and result in far fewer calls to Twitter. I am definitely interested in your feedback on my logic above and if you think it holds... Thanks! Michael. On 10/15/09 7:02 PM, Tim Haines tmhai...@gmail.com wrote: FYI, My backend cares. On Fri, Oct 16, 2009 at 2:07 PM, jmathai jmat...@gmail.com wrote: I'm curious why you're using followers/ids and then users/show for each id? I tried using that and using statuses/followers and found that the total times were in the same ballpark. statuses/followers requires far fewer api calls if you're interested in user objects. FYI, I do want to add and say I agree that either method is EXTREMELY inefficient. Regardless what the argument against pages and for cursors are...the current implementation is painful from an end user perspective. Our backend doesn't really care, but our users don't like to wait 10-30 minutes for a web page to gather a social graph. I wish instead of a cursor I could get a snapshot id, # of pages and a page parameter. I don't know how it's implemented, but the ability to deterministically parallelize the calls - is such a benefit to the end user. Pages let me do that. On Oct 15, 9:17 am, Michael Steuer mste...@gmail.com wrote: That's great!! I'm currently using the suggested method (get IDs, then do users/show for each of them) and it's horrendously slow and cumbersome. It'd be great if you could get a 100 user objects at the time, based on 100 ids you provide.. On 10/14/09 7:30 PM, Chad Etzel c...@twitter.com wrote: I agree. I'm lobbying the team for something like this. -Chad On Wed, Oct 14, 2009 at 10:21 PM, Josh Roesslein jroessl...@gmail.com wrote: Yeah we really need a way to bulk request user payloads by giving a list of IDs. On Wed, Oct 14, 2009 at 9:19 PM, Tim Haines tmhai...@gmail.com wrote: Are you suggesting I should retrieve the 2k users 1 at a time from users/show once I have the ids? I'd essentially like to do this, but 100 at a time. I know I can get the 7000 ids in 2 calls (1 even without the cursors) - but I actually want the whole user objects.. Tim. On Oct 15, 2:56 pm, Chad Etzel c...@twitter.com wrote: If you are pulling down the entire social graph, why not use the social graph calls which would deliver all 7000 ids in 2 calls? You can also parallelize this process by looping through different users on each thread instead of using each thread to grab a different page/cursor of the same user. Regarding the code issue you submitted, if you have the users cached locally, you could use the social graph methods to determine the missing/new 2k users pretty quickly using the social graph methods and comparing ids. -Chad On Wed, Oct 14, 2009 at 9:50 PM, Tim Haines tmhai...@gmail.com wrote: Hi Chad, Statuses/followers. I've just timed another attempt - it took 25 minutes to retrieve 17957 followers with statuses/followers. Is there anything I can elaborate on in the filed issue to make it clearer? Tim. On Oct 15, 2:42 pm, Chad Etzel c...@twitter.com
[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID
Below are the responses. I tried various combinations of - uusername:pass -u=username:pass -u username:pass and each time got an authentication error. Without authentication [madhatter:~/Desktop] ryan% curl -vvv http://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.100... connected * Connected to twitter.com (168.143.162.100) port 80 (#0) GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 132 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256065275 X-experimental-RLS-th: notreq X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:03:41 GMT Server: hi X-RateLimit-Limit: 150 X-Transaction: 1256061824-5820-4214 WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:03:44 GMT X-RateLimit-Remaining: 133 X-Runtime: 0.05350 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256065275 Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CDoRdHJhbnNfcHJvbXB0MDoHaWQiJWM5OTU5MWNkNmE5MjMwNzU0Nzhh %250AMzdkMTA3NzE2Zjk5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFz %250AaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--73f950f824e3e048d3691a3eeec8a8fbbab21743; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 {request:/statuses/user_timeline.json? user_id=1255997062count=100,error:This method requires authentication.} With authentication: [madhatter:~/Desktop] ryan% curl -vvv -uusername:pass http://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.68... connected * Connected to twitter.com (168.143.162.68) port 80 (#0) * Server auth using Basic with user ' ' GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 Authorization: Basic *redacted* User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256064142 X-experimental-RLS-th: succ X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:04:33 GMT Server: hi X-RateLimit-Limit: 2 X-Transaction: 1256061882-45021-11545 * Authentication problem. Ignoring this. WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:04:42 GMT X-RateLimit-Remaining: 19823 X-Runtime: 0.11979 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256064139 Set-Cookie: lang=en; path=/ Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CjoTcGFzc3dvcmRfdG9rZW4iLTg1ZTQ4OTU0ZjdmM2MyOGQzMjFhOGIy %250ANjEyYjBhZDAzZjYzZjY3M2Y6EXRyYW5zX3Byb21wdDA6CXVzZXJpA57usDoH %250AaWQiJTgxZTNhMGNlYmE0YjRlNWI2NWRlZjdhZjU3ZDk3MmM2IgpmbGFzaElD %250AOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNl %250AZHsA--26052e0c4f20f2f852537f173106f426be9df437; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 On Oct 20, 10:25 am, Chad Etzel c...@twitter.com wrote: Hi Ryan, This sounds like a bug. Can you provide full HTTP request/response headers+body traces for some of these requests? (be sure to obscure the authentication header). Using curl -vvv would be good. -Chad On Tue, Oct 20, 2009 at 1:10 PM, Ryan Rosario uclamath...@gmail.com wrote: I have been running into a recurring problem that I have been facing for the past couple of days, on numerous machines. I am extracting 200 tweets for a large number of users, using the numeric user ID (user_id). After a small number of requests (between 10 and 50) I receive nothing but This method requires authentication. Authenticating with my username and password does not make the message go away. I have verified that the users I am trying to pull are not protected users. I have also verified that I am not hitting the rate limit. On my latest attempt, I used an IP I have not used in the past. I was able to extract the first 200 tweets for *12* users, then I started receiving 401s (This method requires authentication) on every single request of this type. After about 10 minutes, I tried again and it worked for about another 15 users, then I
[twitter-dev] Re: linespaces / whitespace being removed: bug or feature?
As an aside; please don't bump threads on this list. -- ivey On Tue, Oct 20, 2009 at 12:58 PM, Tim Haines tmhai...@gmail.com wrote: Bump. On 20/10/2009, at 3:54 PM, TjL luo...@gmail.com wrote: http://twitter.com/status/show/5008681027.xml|http://twitter.com/status/show/5008681027.xml%7Cwas entered with newlines between the words. It does not show the newlines. http://twitter.com/status/show/4999223282.xml shows that this was working just a few hours ago. Both were entered on the web. Is this a bug or an intended change?
[twitter-dev] Re: twitter encoding problem
I have the same problem. See an example here: http://www.grunder.no/grundere/20091006/svaksynte-ma-bli-grundere/ Click the link under the main text where it says Del på Twitter (Norwegian for Share on Twitter). When the new window opens, you can see the URL with ü, Ü and Ø in it, but then as it's redirected on Twitter, they are encoded (which is good, I suppose) – but they're not decoded back when inserted into the text field. I managed to get rid of the %20 for spaces by replacing them with plus signs, but as for the rest, I'm clueless.
[twitter-dev] Re: Checking if a user exists by email
I can see how this might look like a spammer's request, but it can be used for legitimate purposes. Thanks for the info though. On Oct 15, 9:06 am, Andrew Badera and...@badera.us wrote: Haven't you heard about the allegedly spammer-hostile Address Book API that's coming soon? ∞ Andy Badera ∞ +1 518-641-1280 ∞ This email is: [ ] bloggable [x] ask first [ ] private ∞ Google me:http://www.google.com/search?q=andrew%20badera On Thu, Oct 15, 2009 at 10:00 AM, Duane Roelands duane.roela...@gmail.com wrote: ...and there never ever should be. On Oct 14, 4:55 pm, JDG ghil...@gmail.com wrote: no. On Wed, Oct 14, 2009 at 09:50, HAR HAR harsocialme...@gmail.com wrote: There was a post on this group called API Method for checking if a user exists? a while ago. The method for checking if a user exist described there no longer works. Is there a way for me to use the API to verify if an email address is associated with a twitter account? Thanks. -- Internets. Serious business.
[twitter-dev] Re: Checking if a user exists by email
No one accused you to be a spammer, and there are definitely very useful scenarios for such a functionality. But, and that's the key point, there a many many more scenarios in which it could be abused by spammers... Marco 2009/10/20 HAR Devel harsocialme...@gmail.com I can see how this might look like a spammer's request, but it can be used for legitimate purposes. Thanks for the info though. On Oct 15, 9:06 am, Andrew Badera and...@badera.us wrote: Haven't you heard about the allegedly spammer-hostile Address Book API that's coming soon? ∞ Andy Badera ∞ +1 518-641-1280 ∞ This email is: [ ] bloggable [x] ask first [ ] private ∞ Google me:http://www.google.com/search?q=andrew%20badera On Thu, Oct 15, 2009 at 10:00 AM, Duane Roelands duane.roela...@gmail.com wrote: ...and there never ever should be. On Oct 14, 4:55 pm, JDG ghil...@gmail.com wrote: no. On Wed, Oct 14, 2009 at 09:50, HAR HAR harsocialme...@gmail.com wrote: There was a post on this group called API Method for checking if a user exists? a while ago. The method for checking if a user exist described there no longer works. Is there a way for me to use the API to verify if an email address is associated with a twitter account? Thanks. -- Internets. Serious business.
[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID
Apart from the 401 issue, the following is also very weird: X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-RateLimit-Limit: 2 This is on the second authenticated call. On the unauthenticated call X-RateLimit-Limit was 150. I assume both calls were made from the same IP address? Dewald On Oct 20, 3:10 pm, Ryan Rosario uclamath...@gmail.com wrote: Below are the responses. I tried various combinations of - uusername:pass -u=username:pass -u username:pass and each time got an authentication error. Without authentication [madhatter:~/Desktop] ryan% curl -vvvhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.100... connected * Connected to twitter.com (168.143.162.100) port 80 (#0) GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 132 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256065275 X-experimental-RLS-th: notreq X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:03:41 GMT Server: hi X-RateLimit-Limit: 150 X-Transaction: 1256061824-5820-4214 WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:03:44 GMT X-RateLimit-Remaining: 133 X-Runtime: 0.05350 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256065275 Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CDoRdHJhbnNfcHJvbXB0MDoHaWQiJWM5OTU5MWNkNmE5MjMwNzU0Nzhh %250AMzdkMTA3NzE2Zjk5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFz %250AaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--73f950f824e3e048d3691a3eeec8a8fbbab21743; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 {request:/statuses/user_timeline.json? user_id=1255997062count=100,error:This method requires authentication.} With authentication: [madhatter:~/Desktop] ryan% curl -vvv -uusername:passhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.68... connected * Connected to twitter.com (168.143.162.68) port 80 (#0) * Server auth using Basic with user ' ' GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 Authorization: Basic *redacted* User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256064142 X-experimental-RLS-th: succ X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:04:33 GMT Server: hi X-RateLimit-Limit: 2 X-Transaction: 1256061882-45021-11545 * Authentication problem. Ignoring this. WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:04:42 GMT X-RateLimit-Remaining: 19823 X-Runtime: 0.11979 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256064139 Set-Cookie: lang=en; path=/ Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CjoTcGFzc3dvcmRfdG9rZW4iLTg1ZTQ4OTU0ZjdmM2MyOGQzMjFhOGIy %250ANjEyYjBhZDAzZjYzZjY3M2Y6EXRyYW5zX3Byb21wdDA6CXVzZXJpA57usDoH %250AaWQiJTgxZTNhMGNlYmE0YjRlNWI2NWRlZjdhZjU3ZDk3MmM2IgpmbGFzaElD %250AOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNl %250AZHsA--26052e0c4f20f2f852537f173106f426be9df437; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 On Oct 20, 10:25 am, Chad Etzel c...@twitter.com wrote: Hi Ryan, This sounds like a bug. Can you provide full HTTP request/response headers+body traces for some of these requests? (be sure to obscure the authentication header). Using curl -vvv would be good. -Chad On Tue, Oct 20, 2009 at 1:10 PM, Ryan Rosario uclamath...@gmail.com wrote: I have been running into a recurring problem that I have been facing for the past couple of days, on numerous machines. I am extracting 200 tweets for a large number of users, using the numeric user ID (user_id). After a small number of requests (between 10 and 50) I receive nothing but This method requires authentication. Authenticating with my username and password does not make the
[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID
Correct. I thought that was weird, but didn't know what to make of it. Same IP. The unauthenticated call was from an IP that is not whitelisted, so 150/hr. The second call was from the same IP, but authenticated as a whitelisted account, so should be 2/hr. I usually only work from the whitelisted IPs, but wanted to check an IP that had never been used before for data mining. On Oct 20, 11:36 am, Dewald Pretorius dpr...@gmail.com wrote: Apart from the 401 issue, the following is also very weird: X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-RateLimit-Limit: 2 This is on the second authenticated call. On the unauthenticated call X-RateLimit-Limit was 150. I assume both calls were made from the same IP address? Dewald On Oct 20, 3:10 pm, Ryan Rosario uclamath...@gmail.com wrote: Below are the responses. I tried various combinations of - uusername:pass -u=username:pass -u username:pass and each time got an authentication error. Without authentication [madhatter:~/Desktop] ryan% curl -vvvhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.100... connected * Connected to twitter.com (168.143.162.100) port 80 (#0) GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 132 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256065275 X-experimental-RLS-th: notreq X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:03:41 GMT Server: hi X-RateLimit-Limit: 150 X-Transaction: 1256061824-5820-4214 WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:03:44 GMT X-RateLimit-Remaining: 133 X-Runtime: 0.05350 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256065275 Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CDoRdHJhbnNfcHJvbXB0MDoHaWQiJWM5OTU5MWNkNmE5MjMwNzU0Nzhh %250AMzdkMTA3NzE2Zjk5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFz %250AaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--73f950f824e3e048d3691a3eeec8a8fbbab2 1743; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 {request:/statuses/user_timeline.json? user_id=1255997062count=100,error:This method requires authentication.} With authentication: [madhatter:~/Desktop] ryan% curl -vvv -uusername:passhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.68... connected * Connected to twitter.com (168.143.162.68) port 80 (#0) * Server auth using Basic with user ' ' GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 Authorization: Basic *redacted* User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256064142 X-experimental-RLS-th: succ X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:04:33 GMT Server: hi X-RateLimit-Limit: 2 X-Transaction: 1256061882-45021-11545 * Authentication problem. Ignoring this. WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:04:42 GMT X-RateLimit-Remaining: 19823 X-Runtime: 0.11979 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256064139 Set-Cookie: lang=en; path=/ Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CjoTcGFzc3dvcmRfdG9rZW4iLTg1ZTQ4OTU0ZjdmM2MyOGQzMjFhOGIy %250ANjEyYjBhZDAzZjYzZjY3M2Y6EXRyYW5zX3Byb21wdDA6CXVzZXJpA57usDoH %250AaWQiJTgxZTNhMGNlYmE0YjRlNWI2NWRlZjdhZjU3ZDk3MmM2IgpmbGFzaElD %250AOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNl %250AZHsA--26052e0c4f20f2f852537f173106f426be9df437; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 On Oct 20, 10:25 am, Chad Etzel c...@twitter.com wrote: Hi Ryan, This sounds like a bug. Can you provide full HTTP request/response headers+body traces for some of these requests? (be sure
[twitter-dev] Re: twitter encoding problem
hi Travholt, i noticed that too, there is a problem with textbox's or page's encoding so i think there is no way for us to achieve this problem. if you could find a way please let me know good night. On Tue, Oct 20, 2009 at 8:50 PM, Travholt travh...@gmail.com wrote: I have the same problem. See an example here: http://www.grunder.no/grundere/20091006/svaksynte-ma-bli-grundere/ Click the link under the main text where it says Del på Twitter (Norwegian for Share on Twitter). When the new window opens, you can see the URL with ü, Ü and Ø in it, but then as it's redirected on Twitter, they are encoded (which is good, I suppose) – but they're not decoded back when inserted into the text field. I managed to get rid of the %20 for spaces by replacing them with plus signs, but as for the rest, I'm clueless.
[twitter-dev] Re: linespaces / whitespace being removed: bug or feature?
On Tue, Oct 20, 2009 at 2:11 PM, Michael Ivey michael.i...@gmail.com wrote: As an aside; please don't bump threads on this list. As an aside, how about someone answers the question rather than just getting pissy at people who are trying to figure out how a change is going to effect products they're building around Twitter's API? If Twitter is getting rid of whitespace, that means I can strip out a bunch of code in certain places. I'd like someone to comment on this officially. TjL
[twitter-dev] Re: linespaces / whitespace being removed: bug or feature?
I've observed the same behavoir at least 10 hours ago and still seeing it now. -- Hwee-Boon On Oct 21, 3:57 am, TjL luo...@gmail.com wrote: On Tue, Oct 20, 2009 at 2:11 PM, Michael Ivey michael.i...@gmail.com wrote: As an aside; please don't bump threads on this list. As an aside, how about someone answers the question rather than just getting pissy at people who are trying to figure out how a change is going to effect products they're building around Twitter's API? If Twitter is getting rid of whitespace, that means I can strip out a bunch of code in certain places. I'd like someone to comment on this officially. TjL
[twitter-dev] Re: linespaces / whitespace being removed: bug or feature?
I don't know the answer, and I wasn't getting pissy. I was (rather politely, in fact) pointing out that the folks from Twitter have repeatedly asked us not to bump threads here. Just because you're frustrated with a situation doesn't mean you should take that frustration out on the others on the list. -- ivey On Tue, Oct 20, 2009 at 2:57 PM, TjL luo...@gmail.com wrote: On Tue, Oct 20, 2009 at 2:11 PM, Michael Ivey michael.i...@gmail.com wrote: As an aside; please don't bump threads on this list. As an aside, how about someone answers the question rather than just getting pissy at people who are trying to figure out how a change is going to effect products they're building around Twitter's API? If Twitter is getting rid of whitespace, that means I can strip out a bunch of code in certain places. I'd like someone to comment on this officially. TjL
[twitter-dev] Re: linespaces / whitespace being removed: bug or feature?
We are investigating this internally. Please don't bump. -Chad On Tue, Oct 20, 2009 at 4:44 PM, Michael Ivey michael.i...@gmail.com wrote: I don't know the answer, and I wasn't getting pissy. I was (rather politely, in fact) pointing out that the folks from Twitter have repeatedly asked us not to bump threads here. Just because you're frustrated with a situation doesn't mean you should take that frustration out on the others on the list. -- ivey On Tue, Oct 20, 2009 at 2:57 PM, TjL luo...@gmail.com wrote: On Tue, Oct 20, 2009 at 2:11 PM, Michael Ivey michael.i...@gmail.com wrote: As an aside; please don't bump threads on this list. As an aside, how about someone answers the question rather than just getting pissy at people who are trying to figure out how a change is going to effect products they're building around Twitter's API? If Twitter is getting rid of whitespace, that means I can strip out a bunch of code in certain places. I'd like someone to comment on this officially. TjL
[twitter-dev] Re: 502 error for public timeline
They were piling up, it is not my routine to call them every minute, but what happens is I have a 10 second timeout on the curl call, another request comes in, but it is chewing away on the 10 seconds, and they just build up. I have resolved this with some backoff code. I am calling the public timeline 4 times a minute. I read about the cached for 30 seconds, which is just not accurate, the public timeline is updated often. I see it updated on every call, you can call it 60 times in a minute, and will get 60 different result sets. Unless there is a way to pull more than 20 at a time, and I am just getting batches outside the 20 I last called. I did not see the number of results returned as something I can control in the API. I mentioned the frequency in which I was calling the public timeline in my whitelist request, and there was no issue with it. I can not use the streaming API as it does not give me the same type of data I am after. I am going to move down to once every 30 seconds, as it seems four times every 60 seconds does not provide me any more value in the data I am parsing, and just fills the database up with 2x as much data to get the same result. -- Scott * If you contact me off list replace talklists@ with scott@ * On Oct 20, 2009, at 6:09 AM, John Kalucki wrote: Slightly off topic, but why are you calling the public timeline 10 times a minute? It's only updated once every 30 seconds. If you want more public statuses, you should be using the Streaming API. -John Kalucki http://twitter.com/jkalucki Services, Twitter Inc. On Oct 20, 12:44 am, Scott Haneda talkli...@newgeo.com wrote: This is getting out of hand, I am getting 10 a minute. I guess it is time to write that back off code that I figured would not be needed on the public timeline. -- Scott * If you contact me off list replace talklists@ with scott@ * On Oct 19, 2009, at 3:06 PM, Michael Steuer wrote: I've been seeing fail whales on the site as well.. Something must be going on... On 10/19/09 3:03 PM, Scott Haneda talkli...@newgeo.com wrote: I am calling the public timeline once every 60 seconds. Today has been a bad day, 26 total 502 errors since 12:21 PST to now. http public timeline is fine on the website. Any ideas when this is going to be resolved, or if it is even something that Twitter is aware of? If not, heads up :)
[twitter-dev] Re: linespaces / whitespace being removed: bug or feature?
On Tue, Oct 20, 2009 at 5:13 PM, Chad Etzel c...@twitter.com wrote: Just to follow up. We have determined that this is a bug and the engineering team is working to figure out how this snuck in. I'm afraid I don't have an ETA on a fix, but we are working on it. Good to know it isn't a permanent change. Thanks Chad TjL
[twitter-dev] API Changelogs Updates
Can you Twitter folks please update http://apiwiki.twitter.com/REST-API-Changelog more frequently? I know it is not the highest of your priorities, but it will definitely help us having fewer Whiskey Tango Foxtrot moments. Dewald
[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID
Hi Ryan, I think part of the problem is that user id 1255997062 does not exist, so it should really be returning a 404 instead of a 401. Do you get the same 401 result with a known valid user id? -Chad On Tue, Oct 20, 2009 at 3:13 PM, Ryan Rosario uclamath...@gmail.com wrote: Correct. I thought that was weird, but didn't know what to make of it. Same IP. The unauthenticated call was from an IP that is not whitelisted, so 150/hr. The second call was from the same IP, but authenticated as a whitelisted account, so should be 2/hr. I usually only work from the whitelisted IPs, but wanted to check an IP that had never been used before for data mining. On Oct 20, 11:36 am, Dewald Pretorius dpr...@gmail.com wrote: Apart from the 401 issue, the following is also very weird: X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-RateLimit-Limit: 2 This is on the second authenticated call. On the unauthenticated call X-RateLimit-Limit was 150. I assume both calls were made from the same IP address? Dewald On Oct 20, 3:10 pm, Ryan Rosario uclamath...@gmail.com wrote: Below are the responses. I tried various combinations of - uusername:pass -u=username:pass -u username:pass and each time got an authentication error. Without authentication [madhatter:~/Desktop] ryan% curl -vvvhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.100... connected * Connected to twitter.com (168.143.162.100) port 80 (#0) GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 132 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256065275 X-experimental-RLS-th: notreq X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:03:41 GMT Server: hi X-RateLimit-Limit: 150 X-Transaction: 1256061824-5820-4214 WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:03:44 GMT X-RateLimit-Remaining: 133 X-Runtime: 0.05350 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256065275 Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CDoRdHJhbnNfcHJvbXB0MDoHaWQiJWM5OTU5MWNkNmE5MjMwNzU0Nzhh %250AMzdkMTA3NzE2Zjk5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFz %250AaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--73f950f824e3e048d3691a3eeec8a8fbbab2 1743; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 {request:/statuses/user_timeline.json? user_id=1255997062count=100,error:This method requires authentication.} With authentication: [madhatter:~/Desktop] ryan% curl -vvv -uusername:passhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.68... connected * Connected to twitter.com (168.143.162.68) port 80 (#0) * Server auth using Basic with user ' ' GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 Authorization: Basic *redacted* User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256064142 X-experimental-RLS-th: succ X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:04:33 GMT Server: hi X-RateLimit-Limit: 2 X-Transaction: 1256061882-45021-11545 * Authentication problem. Ignoring this. WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:04:42 GMT X-RateLimit-Remaining: 19823 X-Runtime: 0.11979 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256064139 Set-Cookie: lang=en; path=/ Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CjoTcGFzc3dvcmRfdG9rZW4iLTg1ZTQ4OTU0ZjdmM2MyOGQzMjFhOGIy %250ANjEyYjBhZDAzZjYzZjY3M2Y6EXRyYW5zX3Byb21wdDA6CXVzZXJpA57usDoH %250AaWQiJTgxZTNhMGNlYmE0YjRlNWI2NWRlZjdhZjU3ZDk3MmM2IgpmbGFzaElD %250AOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNl %250AZHsA--26052e0c4f20f2f852537f173106f426be9df437; domain=.twitter.com; path=/ Vary:
[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID
I think I see what is happening now. After 15 users or so, I hit a user that no longer exists. On a 404, I skip the user, but on a 401, for the time being, I am retrying, and then maxing out my hourly limit. The other part was my overworked mind. I was pulling numbers that looked like Twitter IDs from the site HTML that actually weren't. And...then testing over and over with those bad numbers. Sigh. I suppose it is safe to treat 401 as a 404? I don't think it would be used for anything else in the REST API, right? Is an HTTP error thrown if I try to pull a protected user's timeline? Thanks, Ryan On Oct 20, 9:10 pm, Chad Etzel c...@twitter.com wrote: Hi Ryan, I think part of the problem is that user id 1255997062 does not exist, so it should really be returning a 404 instead of a 401. Do you get the same 401 result with a known valid user id? -Chad On Tue, Oct 20, 2009 at 3:13 PM, Ryan Rosario uclamath...@gmail.com wrote: Correct. I thought that was weird, but didn't know what to make of it. Same IP. The unauthenticated call was from an IP that is not whitelisted, so 150/hr. The second call was from the same IP, but authenticated as a whitelisted account, so should be 2/hr. I usually only work from the whitelisted IPs, but wanted to check an IP that had never been used before for data mining. On Oct 20, 11:36 am, Dewald Pretorius dpr...@gmail.com wrote: Apart from the 401 issue, the following is also very weird: X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-RateLimit-Limit: 2 This is on the second authenticated call. On the unauthenticated call X-RateLimit-Limit was 150. I assume both calls were made from the same IP address? Dewald On Oct 20, 3:10 pm, Ryan Rosario uclamath...@gmail.com wrote: Below are the responses. I tried various combinations of - uusername:pass -u=username:pass -u username:pass and each time got an authentication error. Without authentication [madhatter:~/Desktop] ryan% curl -vvvhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.100... connected * Connected to twitter.com (168.143.162.100) port 80 (#0) GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 132 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256065275 X-experimental-RLS-th: notreq X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:03:41 GMT Server: hi X-RateLimit-Limit: 150 X-Transaction: 1256061824-5820-4214 WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:03:44 GMT X-RateLimit-Remaining: 133 X-Runtime: 0.05350 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256065275 Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CDoRdHJhbnNfcHJvbXB0MDoHaWQiJWM5OTU5MWNkNmE5MjMwNzU0Nzhh %250AMzdkMTA3NzE2Zjk5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFz %250AaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--73f950f824e3e048d3691a3eeec8a8fbbab2 1743; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 {request:/statuses/user_timeline.json? user_id=1255997062count=100,error:This method requires authentication.} With authentication: [madhatter:~/Desktop] ryan% curl -vvv -uusername:passhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.68... connected * Connected to twitter.com (168.143.162.68) port 80 (#0) * Server auth using Basic with user ' ' GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 Authorization: Basic *redacted* User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256064142 X-experimental-RLS-th: succ X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:04:33 GMT Server: hi X-RateLimit-Limit: 2 X-Transaction: 1256061882-45021-11545 * Authentication problem. Ignoring this. WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:04:42 GMT X-RateLimit-Remaining:
[twitter-dev] Re: 401 Unauthorized -- user_timeline -- using Numeric ID
*bangs head on desk...again* Now that I know what what my Twitter ID is, and I know that I am a valid user, I tried it and it worked. It's gone way past 15 users now without a problem (without error checking). I see what is happening now. After 15 users or so, I hit a user that no longer exists. On a 404, I skip the user, but on a 401, for the time being, I am retrying, and then quickly maxing out my hourly limit. The other part was my overworked mind. I was pulling numbers that looked like Twitter IDs from the site HTML that actually weren't. And...then testing over and over with those bad numbers. Sigh. I suppose it is safe to treat 401 as a 404? I don't think it would be used for anything else in the REST API, right? Is an HTTP error thrown if I try to pull a protected user's timeline? To make a long story short, it does appear that invalid users are returning 401 instead of 404. Thanks, Ryan On Oct 20, 9:10 pm, Chad Etzel c...@twitter.com wrote: Hi Ryan, I think part of the problem is that user id 1255997062 does not exist, so it should really be returning a 404 instead of a 401. Do you get the same 401 result with a known valid user id? -Chad On Tue, Oct 20, 2009 at 3:13 PM, Ryan Rosario uclamath...@gmail.com wrote: Correct. I thought that was weird, but didn't know what to make of it. Same IP. The unauthenticated call was from an IP that is not whitelisted, so 150/hr. The second call was from the same IP, but authenticated as a whitelisted account, so should be 2/hr. I usually only work from the whitelisted IPs, but wanted to check an IP that had never been used before for data mining. On Oct 20, 11:36 am, Dewald Pretorius dpr...@gmail.com wrote: Apart from the 401 issue, the following is also very weird: X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-RateLimit-Limit: 2 This is on the second authenticated call. On the unauthenticated call X-RateLimit-Limit was 150. I assume both calls were made from the same IP address? Dewald On Oct 20, 3:10 pm, Ryan Rosario uclamath...@gmail.com wrote: Below are the responses. I tried various combinations of - uusername:pass -u=username:pass -u username:pass and each time got an authentication error. Without authentication [madhatter:~/Desktop] ryan% curl -vvvhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.100... connected * Connected to twitter.com (168.143.162.100) port 80 (#0) GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 132 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256065275 X-experimental-RLS-th: notreq X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: Tue, 20 Oct 2009 18:03:41 GMT Server: hi X-RateLimit-Limit: 150 X-Transaction: 1256061824-5820-4214 WWW-Authenticate: Basic realm=Twitter API Status: 401 Unauthorized Last-Modified: Tue, 20 Oct 2009 18:03:44 GMT X-RateLimit-Remaining: 133 X-Runtime: 0.05350 Content-Type: application/json; charset=utf-8 Pragma: no-cache Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0 Expires: Tue, 31 Mar 1981 05:00:00 GMT X-Revision: 726d1f10cbe49a923e837d8c3fca3a3993a0f964 X-RateLimit-Reset: 1256065275 Set-Cookie: lang=en; path=/ Set-Cookie: _twitter_sess=BAh7CDoRdHJhbnNfcHJvbXB0MDoHaWQiJWM5OTU5MWNkNmE5MjMwNzU0Nzhh %250AMzdkMTA3NzE2Zjk5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFz %250AaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--73f950f824e3e048d3691a3eeec8a8fbbab2 1743; domain=.twitter.com; path=/ Vary: Accept-Encoding Content-Length: 118 Connection: close * Closing connection #0 {request:/statuses/user_timeline.json? user_id=1255997062count=100,error:This method requires authentication.} With authentication: [madhatter:~/Desktop] ryan% curl -vvv -uusername:passhttp://twitter.com/statuses/user_timeline.json\?user_id=1255997062\count=100 * About to connect() to twitter.com port 80 (#0) * Trying 168.143.162.68... connected * Connected to twitter.com (168.143.162.68) port 80 (#0) * Server auth using Basic with user ' ' GET /statuses/user_timeline.json?user_id=1255997062count=100 HTTP/1.1 Authorization: Basic *redacted* User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: twitter.com Accept: */* HTTP/1.1 401 Unauthorized X-experimental-RLS-remaining: 0 X-experimental-RLS-maxvalue: 150 X-experimental-RLS-reset: 1256064142 X-experimental-RLS-th: succ X-RLS-id: sjc1c032 Via: Cachet/0.91 Date: