since_id limit
I'm just reviewing the API docs, and I'm not clear on something. http://apiwiki.twitter.com/REST+API+Documentation#replies If you pass in a since_id, then do you get ALL the results since that ID, or just the latest 20? I'm planning to ping Twitter every minute and collect the @replies sent to a particular user. I'm sure I won't get more than 20 @replies per minute, but I would like to know if that's something I should note for the future. Thanks, - Trevor
Re: since_id limit
If there are more than 20 results, you can use paging to grab them all. -Original Message- From: Trevor Turk <[EMAIL PROTECTED]> Date: Sun, 30 Nov 2008 23:16:14 To: Twitter Development Talk Subject: since_id limit I'm just reviewing the API docs, and I'm not clear on something. http://apiwiki.twitter.com/REST+API+Documentation#replies If you pass in a since_id, then do you get ALL the results since that ID, or just the latest 20? I'm planning to ping Twitter every minute and collect the @replies sent to a particular user. I'm sure I won't get more than 20 @replies per minute, but I would like to know if that's something I should note for the future. Thanks, - Trevor
Re: Problem with updating Twitter status
Could you please provide request/response output from an HTTP proxy like Charles? The debugging output of HTTP libraries tends to obscure the causes of issues like this. On Fri, Nov 28, 2008 at 02:44, Marcin Lewandowski <[EMAIL PROTECTED]> wrote: > > Hi! > > I try to update status on Twitter from my application, using Apache > Commons HttpClient. I'm totally new to the Twitter API so probably I'm > doing something wrong, but can't figure out what is the problem. I > tried to do everything like it was explained in API documentation, but > get "Your browser sent a request that this server could not > understand" message without any additional information. > Could you please look on the logs below and tell what am I doing > wrong? > > Thanks in advance, > Marcin > > > [DEBUG] 2008-11-28 11:09:04,265 > org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter > http.protocol.content-charset = UTF-8 > [DEBUG] 2008-11-28 11:09:04,265 > org.apache.commons.httpclient.HttpMethodDirector - Preemptively > sending default basic credentials > [DEBUG] 2008-11-28 11:09:04,265 > org.apache.commons.httpclient.HttpMethodDirector - Authenticating with > BASIC @twitter.com:80 > [DEBUG] 2008-11-28 11:09:04,265 > org.apache.commons.httpclient.params.HttpMethodParams - Credential > charset not configured, using HTTP element charset > [DEBUG] 2008-11-28 11:09:04,265 > org.apache.commons.httpclient.HttpConnection - Open connection to > twitter.com:80 > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.header - >> "POST > statuses/update.xml HTTP/1.1[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,140 > org.apache.commons.httpclient.HttpMethodBase - Adding Host request > header > [DEBUG] 2008-11-28 11:09:06,140 > org.apache.commons.httpclient.HttpMethodBase - Default charset used: > UTF-8 > [DEBUG] 2008-11-28 11:09:06,140 > org.apache.commons.httpclient.HttpMethodBase - Default charset used: > UTF-8 > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.header - >> > "Authorization: Basic xxx[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.header - >> "User- > Agent: Jakarta Commons-HttpClient/3.1[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.header - >> "Host: > twitter.com[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.header - >> "Content- > Length: 89[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.header - >> "Content- > Type: application/x-www-form-urlencoded[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.header - >> "[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,140 httpclient.wire.content - >> > "status=Testing+Toaster+with+Twitter+crossposting+after > +NullPointerException+fix...+%3A%29" > [DEBUG] 2008-11-28 11:09:06,140 > org.apache.commons.httpclient.methods.EntityEnclosingMethod - Request > body sent > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "HTTP/1.1 > 400 Bad Request[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "HTTP/1.1 > 400 Bad Request[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "Date: > Fri, 28 Nov 2008 10:09:08 GMT[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "Server: > Apache[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "Vary: > Accept-Encoding[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "Content- > Length: 226[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << > "Connection: close[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "Content- > Type: text/html; charset=iso-8859-1[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.header - << "[\r][\n]" > [DEBUG] 2008-11-28 11:09:06,343 > org.apache.commons.httpclient.HttpMethodBase - Default charset used: > UTF-8 > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << " DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">[\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << > "[\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << > "400 Bad Request[\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << " head>[\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << "Bad > Request[\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << "Your > browser sent a request that this server could not understand. > [\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << " > [\n]" > [DEBUG] 2008-11-28 11:09:06,343 httpclient.wire.content - << " html>[\n]" > [DEBUG] 2008-11-28 11:09:06,343 > org.apache.commons.httpclient.HttpMethodBase - Should close connection > in response to directive: close > [DEBUG] 2008-11-28 11:09:06,343 > org.apache.commons.httpclient.HttpConnection - Releasing connection > back to connection manager. > -- Alex Payne - API Lead, Twitter, Inc. http://twitter.com/al3x
Stability of format of direct message and follower emails?
Hello, This is my first discussion post, so apologies if this has been answered somewhere else. (I did a search but couldn't find anything that seemed to be about this.) To cut down on the number of API calls our application makes, we've written routines that extract relevant information from the emails that are sent by Twitter when a user follows the Twitter account our app is using, and when a user direct messages that account. Basically, if the current format / structure of the emails was to change (specifically the sender email address, the X-twitter header stuff and the body text of direct message emails), our application would enter a world of hurt. So, is the current format / structure of emails fixed? Thanks for your time. Best, Alan.
Re: Stability of format of direct message and follower emails?
The headers will remain, but the body text may change at any time. On Mon, Dec 1, 2008 at 13:15, Alan Holding (brokendrum70) <[EMAIL PROTECTED]> wrote: > > Hello, > > This is my first discussion post, so apologies if this has been > answered somewhere else. (I did a search but couldn't find anything > that seemed to be about this.) > > To cut down on the number of API calls our application makes, we've > written routines that extract relevant information from the emails > that are sent by Twitter when a user follows the Twitter account our > app is using, and when a user direct messages that account. > > Basically, if the current format / structure of the emails was to > change (specifically the sender email address, the X-twitter header > stuff and the body text of direct message emails), our application > would enter a world of hurt. > > So, is the current format / structure of emails fixed? > > Thanks for your time. > > Best, > Alan. > -- Alex Payne - API Lead, Twitter, Inc. http://twitter.com/al3x
Tips on speeding up OR queries?
Hi, OR search queries can take a long time and are causing lots of timeouts with google app engine. Amir
Re: Tips on speeding up OR queries?
The timeout I see as more of a GAE issue, not a Twitter one. You get what you pay for, on both sides of that equation. No SLA, no billing from Twitter, beta and no billing on GAE's part ... and I think we can agree, GAE hasn't been particular forthcoming nor cooperative about what constitutes a true mcycle or a long-running request. That said, perhaps there's some optimization to be done on OR ... Thanks- - Andy Badera - [EMAIL PROTECTED] - (518) 641-1280 - http://higherefficiency.net/ - http://changeroundup.com/ - http://flipbitsnotburgers.blogspot.com/ - http://andrew.badera.us/ - Google me: http://www.google.com/search?q=andrew+badera On Mon, Dec 1, 2008 at 8:10 PM, Amir Michail <[EMAIL PROTECTED]> wrote: > > Hi, > > OR search queries can take a long time and are causing lots of > timeouts with google app engine. > > Amir >
Re: Tips on speeding up OR queries?
On Dec 1, 8:15 pm, "Andrew Badera" <[EMAIL PROTECTED]> wrote: > The timeout I see as more of a GAE issue, not a Twitter one. You get what > you pay for, on both sides of that equation. It's not a CPU usage issue in the GAE. It's just that the request to the twitter search API takes too long and urlfetch times out in the GAE. Hopefully a timeout parameter will be added to urlfetch soon... Amir > > No SLA, no billing from Twitter, beta and no billing on GAE's part ... and I > think we can agree, GAE hasn't been particular forthcoming nor cooperative > about what constitutes a true mcycle or a long-running request. > > That said, perhaps there's some optimization to be done on OR ... > > Thanks- > - Andy Badera > - [EMAIL PROTECTED] > - (518) 641-1280 > > -http://higherefficiency.net/ > -http://changeroundup.com/ > > -http://flipbitsnotburgers.blogspot.com/ > -http://andrew.badera.us/ > > - Google me:http://www.google.com/search?q=andrew+badera > > On Mon, Dec 1, 2008 at 8:10 PM, Amir Michail <[EMAIL PROTECTED]> wrote: > > > Hi, > > > OR search queries can take a long time and are causing lots of > > timeouts with google app engine. > > > Amir
Re: Tips on speeding up OR queries?
On Dec 1, 9:08 pm, Amir Michail <[EMAIL PROTECTED]> wrote: > On Dec 1, 8:15 pm, "Andrew Badera" <[EMAIL PROTECTED]> wrote: > > > The timeout I see as more of a GAE issue, not a Twitter one. You get what > > you pay for, on both sides of that equation. > > It's not a CPU usage issue in the GAE. It's just that the request to > the twitter search API takes too long and urlfetch times out in the > GAE. > > Hopefully a timeout parameter will be added to urlfetch soon... > > Amir > Actually... "Increasing the timeout in production isn't possible at present, and you'll always be bound by our overall request limits." http://groups.google.com/group/google-appengine/msg/f59528628a3bb86e Amir > > > > No SLA, no billing from Twitter, beta and no billing on GAE's part ... and I > > think we can agree, GAE hasn't been particular forthcoming nor cooperative > > about what constitutes a true mcycle or a long-running request. > > > That said, perhaps there's some optimization to be done on OR ... > > > Thanks- > > - Andy Badera > > - [EMAIL PROTECTED] > > - (518) 641-1280 > > > -http://higherefficiency.net/ > > -http://changeroundup.com/ > > > -http://flipbitsnotburgers.blogspot.com/ > > -http://andrew.badera.us/ > > > - Google me:http://www.google.com/search?q=andrew+badera > > > On Mon, Dec 1, 2008 at 8:10 PM, Amir Michail <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > OR search queries can take a long time and are causing lots of > > > timeouts with google app engine. > > > > Amir
Re: Tips on speeding up OR queries?
Which reinforces my "it's a GAE problem" stance ... GAE needs to accept the reality of the demands that will be placed on that system. Long-running operations against foreign servers is one among many such issues. On Mon, Dec 1, 2008 at 9:23 PM, Amir Michail <[EMAIL PROTECTED]> wrote: > > On Dec 1, 9:08 pm, Amir Michail <[EMAIL PROTECTED]> wrote: > > On Dec 1, 8:15 pm, "Andrew Badera" <[EMAIL PROTECTED]> wrote: > > > > > The timeout I see as more of a GAE issue, not a Twitter one. You get > what > > > you pay for, on both sides of that equation. > > > > It's not a CPU usage issue in the GAE. It's just that the request to > > the twitter search API takes too long and urlfetch times out in the > > GAE. > > > > Hopefully a timeout parameter will be added to urlfetch soon... > > > > Amir > > > > Actually... > > "Increasing the timeout in production isn't possible at present, and > you'll always be bound by our overall request limits." > > http://groups.google.com/group/google-appengine/msg/f59528628a3bb86e > > Amir > > > > > > > > No SLA, no billing from Twitter, beta and no billing on GAE's part ... > and I > > > think we can agree, GAE hasn't been particular forthcoming nor > cooperative > > > about what constitutes a true mcycle or a long-running request. > > > > > That said, perhaps there's some optimization to be done on OR ... > > > > > Thanks- > > > - Andy Badera > > > - [EMAIL PROTECTED] > > > - (518) 641-1280 > > > > > -http://higherefficiency.net/ > > > -http://changeroundup.com/ > > > > > -http://flipbitsnotburgers.blogspot.com/ > > > -http://andrew.badera.us/ > > > > > - Google me:http://www.google.com/search?q=andrew+badera > > > > > On Mon, Dec 1, 2008 at 8:10 PM, Amir Michail <[EMAIL PROTECTED]> > wrote: > > > > > > Hi, > > > > > > OR search queries can take a long time and are causing lots of > > > > timeouts with google app engine. > > > > > > Amir >
How to find out how many API requests have been used?
Hi, I started exploring the Twitter API in C# yesterday, and I have a question. Is it possible to find out how many requests out of the maximum 70 per hour have been already used up? Twhirl does this somehow, and they say that this counter will be the same in all Twitter applications, so I assume there's an API method for doing this. I'm using the Yedda Twitter C# library, so you can just answer me with an API method name, and that'll work for me. Thank you so much, -Maximz2005 P.S. Twitter ROCKS!
Cannot POST Updates; API returns a 400.
Hi, I'm testing the exact same open-source script as dabr.co.uk on my server. It uses curl to POST updates using JSON. However, everytime it makes a POST request, the API returns a Error code 400. All GET requests to the API seem to work just fine. I'd appreciate some help on this :)
Re: Cannot POST Updates; API returns a 400.
> I'm testing the exact same open-source script as dabr.co.uk on my > server. It uses curl to POST updates using JSON. However, everytime it > makes a POST request, the API returns a Error code 400. All GET > requests to the API seem to work just fine. You may wish to post some relevant portions of code. -- personal: http://www.cameronkaiser.com/ -- Cameron Kaiser * Floodgap Systems * www.floodgap.com * [EMAIL PROTECTED] -- Gravity is a myth. The Earth just sucks. ---
Re: How to find out how many API requests have been used?
> I started exploring the Twitter API in C# yesterday, and I have a > question. Is it possible to find out how many requests out of the > maximum 70 per hour have been already used up? Twhirl does this > somehow, and they say that this counter will be the same in all > Twitter applications, so I assume there's an API method for doing > this. > > I'm using the Yedda Twitter C# library, so you can just answer me with > an API method name, and that'll work for me. I don't know anything about that particular library, but look at http://apiwiki.twitter.com/REST+API+Documentation under rate_limit_status. -- personal: http://www.cameronkaiser.com/ -- Cameron Kaiser * Floodgap Systems * www.floodgap.com * [EMAIL PROTECTED] -- Burglar alarms: For the man who has everything!
Re: Stability of format of direct message and follower emails?
On Dec 1, 10:19 pm, "Alex Payne" <[EMAIL PROTECTED]> wrote: > The headers will remain, but the body text may change at any time. Thanks, Alex. Will there be any warning of a change to the body text, or would I be best applying for whitelisting and hitting the API to check for new followers / direct messages? (Which is something I really don't want to do unless we get the OK.) Thanks for your time, Alan.
Re: How to find out how many API requests have been used?
Thank you. This is not in the C# library I'm using, but I'll configure it manually. Do you by any chance know whether updating status counts against the rate limit? I wrote a little test program for playing around with the API, that simply posts the time as a status message every 30 seconds. Sometimes, when I go online and check the status messages, they stop abruptly, but the client doesn't give me a 404 error. Is this evidence of reaching the limit? I will try and check this using the method you pointed out, but if you by any chance know the answer to this question, help would be appreciated. -Maximz2005 On Dec 1, 8:23 pm, Cameron Kaiser <[EMAIL PROTECTED]> wrote: > > I started exploring the Twitter API in C# yesterday, and I have a > > question. Is it possible to find out how many requests out of the > > maximum 70 per hour have been already used up? Twhirl does this > > somehow, and they say that this counter will be the same in all > > Twitter applications, so I assume there's an API method for doing > > this. > > > I'm using the Yedda Twitter C# library, so you can just answer me with > > an API method name, and that'll work for me. > > I don't know anything about that particular library, but look at > > http://apiwiki.twitter.com/REST+API+Documentation > > under rate_limit_status. > > -- > personal:http://www.cameronkaiser.com/-- > Cameron Kaiser * Floodgap Systems *www.floodgap.com* [EMAIL PROTECTED] > -- Burglar alarms: For the man who has everything! >
Re: How to find out how many API requests have been used?
> Do you by any chance know whether updating status counts against the > rate limit? It does not. > I wrote a little test program for playing around with the API, that > simply posts the time as a status message every 30 seconds. > Sometimes, when I go online and check the status messages, they stop > abruptly, but the client doesn't give me a 404 error. Is this evidence > of reaching the limit? No, it just means it wasn't posted. However, a test like that being posted out every 30 seconds over and over could be construed as a runaway bot to be filtered. You might not want to constantly update that frequently. -- personal: http://www.cameronkaiser.com/ -- Cameron Kaiser * Floodgap Systems * www.floodgap.com * [EMAIL PROTECTED] -- I like my women like my coffee: weak, cold and bitter. -- Kevin Metcalf
Re: Stability of format of direct message and follower emails?
Unfortunately, I'm not always made aware in advance when changes to language on the site and in emails are made. Whitelisting is one option, or let us know what other headers you'd need so that you don't have to parse the emails at all. On Mon, Dec 1, 2008 at 14:46, Alan Holding (brokendrum70) <[EMAIL PROTECTED]> wrote: > > On Dec 1, 10:19 pm, "Alex Payne" <[EMAIL PROTECTED]> wrote: >> The headers will remain, but the body text may change at any time. > > Thanks, Alex. Will there be any warning of a change to the body text, > or would I be best applying for whitelisting and hitting the API to > check for new followers / direct messages? (Which is something I > really don't want to do unless we get the OK.) > > Thanks for your time, > Alan. > -- Alex Payne - API Lead, Twitter, Inc. http://twitter.com/al3x