Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-29 Thread Eric Mortensen
For instance, set up the my database to create 200 tweets to post to a
account. It ran at 11:49 AM EST.  I noticed that 127 tweets were posted and
the remaining got kicked with the error response. Not sure if there is a
limit of 127 I thought it was 150 limit per hour.  This also does not hit
the 1000 daily limit since it was only 200 tweets.  I will try this again in
about 1 hour.  I should be able to start tweeting again.  Let me know what
you think?

On Wed, Jul 28, 2010 at 12:19 PM, Eric Mortensen emort...@gmail.com wrote:

 But, It appears did not hit a 1000 update limit since after an hour and can
 start updates again.  That why it appears to be an hourly limit.  Not to
 mention when this started I did not even have a 1000 tweets total on the
 account.  That is why it can't be the 1000 a day limit. There is should be
 another reason for this.


 On Tue, Jul 27, 2010 at 6:56 PM, Matt Harris thematthar...@twitter.comwrote:

 Hey Eric,

 That error is the Twitter Limits kicking in saying there are too many
 status updates being posted by the account. This isn't an API rate limit but
 a natural limit which applies to all of Twitter. A user may not Twitter more
 than 1000 updates a day (this includes retweets).

 More information on these limits are explained on the page I linked to
 before:  http://support.twitter.com/forums/10711/entries/15364

 Hope that clarifies the what is happening.
 Matt


 On Tue, Jul 27, 2010 at 12:27 PM, Eric Mortensen emort...@gmail.comwrote:

 Here is a response:
 ?xml version=1.0 encoding=UTF-8?
 hash
   errorUser is over daily status update limit./error
   request/1/statuses/update.xml/request
 /hash



 On Thu, Jul 15, 2010 at 5:41 PM, Matt Harris 
 thematthar...@twitter.comwrote:

 Hey Eric,

 Sorry that help article didn't answer your question. Can you provide the
 actual HTTP request being made and the HTTP response you get back? We're
 interested in the response body content in particular.

 Also, remember we disable basic authentication on August 16th so you
 want to switch to that method of authentication now.

 Matt

 On Thu, Jul 15, 2010 at 12:46 PM, Eric Mortensen emort...@gmail.comwrote:

 Unfortunately not.  Do you have anything else that might explain it?


 On Thu, Jul 15, 2010 at 1:48 PM, Matt Harris 
 thematthar...@twitter.com wrote:

 Hi Eric,

 In addition to the API Rate Limits there are general usage limits
 which apply to all of Twitter, including the website. These limits 
 restrict
 various actions including the number of updates that can be posted per 
 day.

 You can read more about Twitter Limits on our help website:
 http://support.twitter.com/forums/10711/entries/15364

 Hope that answers your question,
 Matt


 On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
 1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
 database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 

Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-29 Thread Eric Mortensen
Why not? If Twitter states I can send 150 an hour or 1000 a day I should be
able to.  Not my rules its twitters. So I guess it needs to be written
somewhere that 42 per hour is the limit.  I am just trying to understand why
it appears that I am hitting a limit when i am only doing what twitter
apparently allows.  The limit I see is possibly the number of messages sent
at one time and twitter can't handle it and throws the error I have been
receiving.  So if that exists than I understand.  I just need to know where
it is stated.  The error message appears to wrong as well since I can still
send tweets and it has been a couple hours later.  Then I can tell the
program manager that this is why we can't send this many messages because of
this limit.  Maybe what will help is a link stating that there are
protections that prevent a certain number of updates/tweets happening at
once.

Thanks

On Thu, Jul 29, 2010 at 3:22 PM, Matt Harris thematthar...@twitter.comwrote:

 Why are you sending so many Tweets? It sounds like you are being restricted
 because you are sending too many per hour. The limit of updates per day
 exists but there are protections to prevent all those updates happening at
 once. I'm not familiar with the code that handles the measure windows or
 what the limits are but consider that 1000 tweets per day is approx 42 per
 hour.

 Matt


 On Thu, Jul 29, 2010 at 8:59 AM, Eric Mortensen emort...@gmail.comwrote:

 For instance, set up the my database to create 200 tweets to post to a
 account. It ran at 11:49 AM EST.  I noticed that 127 tweets were posted and
 the remaining got kicked with the error response. Not sure if there is a
 limit of 127 I thought it was 150 limit per hour.  This also does not hit
 the 1000 daily limit since it was only 200 tweets.  I will try this again in
 about 1 hour.  I should be able to start tweeting again.  Let me know what
 you think?


 On Wed, Jul 28, 2010 at 12:19 PM, Eric Mortensen emort...@gmail.comwrote:

 But, It appears did not hit a 1000 update limit since after an hour and
 can start updates again.  That why it appears to be an hourly limit.  Not to
 mention when this started I did not even have a 1000 tweets total on the
 account.  That is why it can't be the 1000 a day limit. There is should be
 another reason for this.


 On Tue, Jul 27, 2010 at 6:56 PM, Matt Harris 
 thematthar...@twitter.comwrote:

 Hey Eric,

 That error is the Twitter Limits kicking in saying there are too many
 status updates being posted by the account. This isn't an API rate limit 
 but
 a natural limit which applies to all of Twitter. A user may not Twitter 
 more
 than 1000 updates a day (this includes retweets).

 More information on these limits are explained on the page I linked to
 before:  http://support.twitter.com/forums/10711/entries/15364

 Hope that clarifies the what is happening.
 Matt


 On Tue, Jul 27, 2010 at 12:27 PM, Eric Mortensen emort...@gmail.comwrote:

 Here is a response:
 ?xml version=1.0 encoding=UTF-8?
 hash
   errorUser is over daily status update limit./error
   request/1/statuses/update.xml/request
 /hash



 On Thu, Jul 15, 2010 at 5:41 PM, Matt Harris 
 thematthar...@twitter.com wrote:

 Hey Eric,

 Sorry that help article didn't answer your question. Can you provide
 the actual HTTP request being made and the HTTP response you get back? 
 We're
 interested in the response body content in particular.

 Also, remember we disable basic authentication on August 16th so you
 want to switch to that method of authentication now.

 Matt

 On Thu, Jul 15, 2010 at 12:46 PM, Eric Mortensen 
 emort...@gmail.comwrote:

 Unfortunately not.  Do you have anything else that might explain it?


 On Thu, Jul 15, 2010 at 1:48 PM, Matt Harris 
 thematthar...@twitter.com wrote:

 Hi Eric,

 In addition to the API Rate Limits there are general usage limits
 which apply to all of Twitter, including the website. These limits 
 restrict
 various actions including the number of updates that can be posted per 
 day.

 You can read more about Twitter Limits on our help website:
 http://support.twitter.com/forums/10711/entries/15364

 Hope that answers your question,
 Matt


 On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason
 why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID

Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-29 Thread Matt Harris
Hey Eric,

The 150 limit you refer to relates to GET requests to the API. This is
documented on our developer resources site at
http://dev.twitter.com/pages/rate-limiting#rest. So information is collected
in the same place i'll explain the rate limiting concepts of interest in
this message.

In our rate limiting document we state:

Rate limits are applied to methods that request information with the HTTP
GET command. Generally API methods that use HTTP POST to submit data to
Twitter are not rate limited, however some methods are being rate limited
now. Every method in the API Documentation explains if it is rate limited or
not.

We go on to say:

API methods which are not directly rate limited are still controlled by the
daily update and follower limits to promote healthy use and discourage spam.
These Twitter Limits are described on our help site.


The Twitter Limits links to our help document here:
http://support.twitter.com/forums/10711/entries/15364


In that help document we state:

Updates: 1,000 per day. The daily update limit is further broken down into
smaller limits for semi-hourly intervals. Retweets are counted as updates.


and go on to say:

These limits include actions from all devices including web, mobile, phone,
API, etc. API requests from all third-party applications are tracked against
the hourly API limit. People who use multiple third-party applications with
their account will therefore reach the API limit more quickly.


and ...

These limits may be temporarily reduced during periods of heavy site usage.
In such cases, we will post an update at the Twitter Status blog.


The 150 you refer to, assuming you are using Basic Authentication, is the
total number of API rate limited requests an IP is permitted to make per
hour. If you use OAuth (which you must do before August 16th) you get 350
API rate limited requests per hour. These requests are not the same ones as
those which update your status though.


We do say you can send up to 1000 updates (including retweets) in a day. My
example of 42 updates per hour was simply dividing 1000/24 to give an
indication of how sending 200 updates is a very large number of Tweets to be
sending in one hourly interval.


As natefanaro has said, exact hourly limits are not published or released to
avoid abuse.

I hope the explanation above explains rate limiting and how it applies
differently to read and write requests.


Best,

Matt





On Thu, Jul 29, 2010 at 12:50 PM, Eric Mortensen emort...@gmail.com wrote:

 Why not? If Twitter states I can send 150 an hour or 1000 a day I should be
 able to.  Not my rules its twitters. So I guess it needs to be written
 somewhere that 42 per hour is the limit.  I am just trying to understand why
 it appears that I am hitting a limit when i am only doing what twitter
 apparently allows.  The limit I see is possibly the number of messages sent
 at one time and twitter can't handle it and throws the error I have been
 receiving.  So if that exists than I understand.  I just need to know where
 it is stated.  The error message appears to wrong as well since I can still
 send tweets and it has been a couple hours later.  Then I can tell the
 program manager that this is why we can't send this many messages because of
 this limit.  Maybe what will help is a link stating that there are
 protections that prevent a certain number of updates/tweets happening at
 once.

 Thanks

 On Thu, Jul 29, 2010 at 3:22 PM, Matt Harris thematthar...@twitter.comwrote:

 Why are you sending so many Tweets? It sounds like you are being
 restricted because you are sending too many per hour. The limit of updates
 per day exists but there are protections to prevent all those updates
 happening at once. I'm not familiar with the code that handles the measure
 windows or what the limits are but consider that 1000 tweets per day is
 approx 42 per hour.

 Matt


 On Thu, Jul 29, 2010 at 8:59 AM, Eric Mortensen emort...@gmail.comwrote:

 For instance, set up the my database to create 200 tweets to post to a
 account. It ran at 11:49 AM EST.  I noticed that 127 tweets were posted and
 the remaining got kicked with the error response. Not sure if there is a
 limit of 127 I thought it was 150 limit per hour.  This also does not hit
 the 1000 daily limit since it was only 200 tweets.  I will try this again in
 about 1 hour.  I should be able to start tweeting again.  Let me know what
 you think?


 On Wed, Jul 28, 2010 at 12:19 PM, Eric Mortensen emort...@gmail.comwrote:

 But, It appears did not hit a 1000 update limit since after an hour and
 can start updates again.  That why it appears to be an hourly limit.  Not 
 to
 mention when this started I did not even have a 1000 tweets total on the
 account.  That is why it can't be the 1000 a day limit. There is should be
 another reason for this.


 On Tue, Jul 27, 2010 at 6:56 PM, Matt Harris thematthar...@twitter.com
  wrote:

 Hey Eric,

 That error is the Twitter Limits kicking in saying there 

Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-28 Thread Eric Mortensen
But, It appears did not hit a 1000 update limit since after an hour and can
start updates again.  That why it appears to be an hourly limit.  Not to
mention when this started I did not even have a 1000 tweets total on the
account.  That is why it can't be the 1000 a day limit. There is should be
another reason for this.

On Tue, Jul 27, 2010 at 6:56 PM, Matt Harris thematthar...@twitter.comwrote:

 Hey Eric,

 That error is the Twitter Limits kicking in saying there are too many
 status updates being posted by the account. This isn't an API rate limit but
 a natural limit which applies to all of Twitter. A user may not Twitter more
 than 1000 updates a day (this includes retweets).

 More information on these limits are explained on the page I linked to
 before:  http://support.twitter.com/forums/10711/entries/15364

 Hope that clarifies the what is happening.
 Matt


 On Tue, Jul 27, 2010 at 12:27 PM, Eric Mortensen emort...@gmail.comwrote:

 Here is a response:
 ?xml version=1.0 encoding=UTF-8?
 hash
   errorUser is over daily status update limit./error
   request/1/statuses/update.xml/request
 /hash



 On Thu, Jul 15, 2010 at 5:41 PM, Matt Harris 
 thematthar...@twitter.comwrote:

 Hey Eric,

 Sorry that help article didn't answer your question. Can you provide the
 actual HTTP request being made and the HTTP response you get back? We're
 interested in the response body content in particular.

 Also, remember we disable basic authentication on August 16th so you want
 to switch to that method of authentication now.

 Matt

 On Thu, Jul 15, 2010 at 12:46 PM, Eric Mortensen emort...@gmail.comwrote:

 Unfortunately not.  Do you have anything else that might explain it?


 On Thu, Jul 15, 2010 at 1:48 PM, Matt Harris thematthar...@twitter.com
  wrote:

 Hi Eric,

 In addition to the API Rate Limits there are general usage limits which
 apply to all of Twitter, including the website. These limits restrict
 various actions including the number of updates that can be posted per 
 day.

 You can read more about Twitter Limits on our help website:
 http://support.twitter.com/forums/10711/entries/15364

 Hope that answers your question,
 Matt


 On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
 1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
 database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Length',
  value = length(v_status));

-- authenticate with twitter user/pass
UTL_HTTP.SET_AUTHENTICATION(
  r = v_req,
  username = p_user,
  password = p_pwd );

-- Send the update
UTL_HTTP.WRITE_TEXT(
  r = v_req,
  data = v_status );

UTL_HTTP.end_request (v_req);

RETURN TRUE;

  EXCEPTION
-- normal exception when reading the response
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.end_request (v_req);
  RETURN TRUE;

-- Anything else and send false
WHEN OTHERS 

Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-27 Thread Eric Mortensen
Here is a response:
?xml version=1.0 encoding=UTF-8?
hash
  errorUser is over daily status update limit./error
  request/1/statuses/update.xml/request
/hash



On Thu, Jul 15, 2010 at 5:41 PM, Matt Harris thematthar...@twitter.comwrote:

 Hey Eric,

 Sorry that help article didn't answer your question. Can you provide the
 actual HTTP request being made and the HTTP response you get back? We're
 interested in the response body content in particular.

 Also, remember we disable basic authentication on August 16th so you want
 to switch to that method of authentication now.

 Matt

 On Thu, Jul 15, 2010 at 12:46 PM, Eric Mortensen emort...@gmail.comwrote:

 Unfortunately not.  Do you have anything else that might explain it?


 On Thu, Jul 15, 2010 at 1:48 PM, Matt Harris 
 thematthar...@twitter.comwrote:

 Hi Eric,

 In addition to the API Rate Limits there are general usage limits which
 apply to all of Twitter, including the website. These limits restrict
 various actions including the number of updates that can be posted per day.

 You can read more about Twitter Limits on our help website:
 http://support.twitter.com/forums/10711/entries/15364

 Hope that answers your question,
 Matt


 On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
 1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
 database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Length',
  value = length(v_status));

-- authenticate with twitter user/pass
UTL_HTTP.SET_AUTHENTICATION(
  r = v_req,
  username = p_user,
  password = p_pwd );

-- Send the update
UTL_HTTP.WRITE_TEXT(
  r = v_req,
  data = v_status );

UTL_HTTP.end_request (v_req);

RETURN TRUE;

  EXCEPTION
-- normal exception when reading the response
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.end_request (v_req);
  RETURN TRUE;

-- Anything else and send false
WHEN OTHERS THEN
  UTL_HTTP.end_request (v_req);
  Dbms_Output.Put_Line ( 'Request_Failed: ' ||
 Utl_Http.Get_Detailed_Sqlerrm );
  Dbms_Output.Put_Line ( 'Ora: ' || Sqlerrm );
 RETURN FALSE;

  END;

 END tweet;



 Thanks




 --


 Matt Harris
 Developer Advocate, Twitter
 http://twitter.com/themattharris





 --


 Matt Harris
 Developer Advocate, Twitter
 http://twitter.com/themattharris



Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-27 Thread Matt Harris
Hey Eric,

That error is the Twitter Limits kicking in saying there are too many status
updates being posted by the account. This isn't an API rate limit but a
natural limit which applies to all of Twitter. A user may not Twitter more
than 1000 updates a day (this includes retweets).

More information on these limits are explained on the page I linked to
before:  http://support.twitter.com/forums/10711/entries/15364

Hope that clarifies the what is happening.
Matt


On Tue, Jul 27, 2010 at 12:27 PM, Eric Mortensen emort...@gmail.com wrote:

 Here is a response:
 ?xml version=1.0 encoding=UTF-8?
 hash
   errorUser is over daily status update limit./error
   request/1/statuses/update.xml/request
 /hash



 On Thu, Jul 15, 2010 at 5:41 PM, Matt Harris thematthar...@twitter.comwrote:

 Hey Eric,

 Sorry that help article didn't answer your question. Can you provide the
 actual HTTP request being made and the HTTP response you get back? We're
 interested in the response body content in particular.

 Also, remember we disable basic authentication on August 16th so you want
 to switch to that method of authentication now.

 Matt

 On Thu, Jul 15, 2010 at 12:46 PM, Eric Mortensen emort...@gmail.comwrote:

 Unfortunately not.  Do you have anything else that might explain it?


 On Thu, Jul 15, 2010 at 1:48 PM, Matt Harris 
 thematthar...@twitter.comwrote:

 Hi Eric,

 In addition to the API Rate Limits there are general usage limits which
 apply to all of Twitter, including the website. These limits restrict
 various actions including the number of updates that can be posted per day.

 You can read more about Twitter Limits on our help website:
 http://support.twitter.com/forums/10711/entries/15364

 Hope that answers your question,
 Matt


 On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
 1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
 database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Length',
  value = length(v_status));

-- authenticate with twitter user/pass
UTL_HTTP.SET_AUTHENTICATION(
  r = v_req,
  username = p_user,
  password = p_pwd );

-- Send the update
UTL_HTTP.WRITE_TEXT(
  r = v_req,
  data = v_status );

UTL_HTTP.end_request (v_req);

RETURN TRUE;

  EXCEPTION
-- normal exception when reading the response
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.end_request (v_req);
  RETURN TRUE;

-- Anything else and send false
WHEN OTHERS THEN
  UTL_HTTP.end_request (v_req);
  Dbms_Output.Put_Line ( 'Request_Failed: ' ||
 Utl_Http.Get_Detailed_Sqlerrm );
  Dbms_Output.Put_Line ( 'Ora: ' || Sqlerrm );
 RETURN FALSE;

  END;

 END tweet;



 Thanks




 --


 Matt Harris
 Developer Advocate, Twitter
 http://twitter.com/themattharris





 --


 Matt Harris
 Developer Advocate, Twitter
 http://twitter.com/themattharris





-- 



[twitter-dev] API HTTP Post statuses/update.xml

2010-07-15 Thread Eric
It appears that I am hitting a 150 post rate limit when I use the
statuses/update.xml api to update a twitter account eventhough I
should not have this limit doing only a post. Is there a reason why?
Here is the code I am using from oracle to do this:

create or replace PACKAGE BODY tweet
AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Length',
  value = length(v_status));

-- authenticate with twitter user/pass
UTL_HTTP.SET_AUTHENTICATION(
  r = v_req,
  username = p_user,
  password = p_pwd );

-- Send the update
UTL_HTTP.WRITE_TEXT(
  r = v_req,
  data = v_status );

UTL_HTTP.end_request (v_req);

RETURN TRUE;

  EXCEPTION
-- normal exception when reading the response
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.end_request (v_req);
  RETURN TRUE;

-- Anything else and send false
WHEN OTHERS THEN
  UTL_HTTP.end_request (v_req);
  Dbms_Output.Put_Line ( 'Request_Failed: ' ||
Utl_Http.Get_Detailed_Sqlerrm );
  Dbms_Output.Put_Line ( 'Ora: ' || Sqlerrm );
 RETURN FALSE;

  END;

END tweet;



Thanks


Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-15 Thread Matt Harris
Hi Eric,

In addition to the API Rate Limits there are general usage limits which
apply to all of Twitter, including the website. These limits restrict
various actions including the number of updates that can be posted per day.

You can read more about Twitter Limits on our help website:
http://support.twitter.com/forums/10711/entries/15364

Hope that answers your question,
Matt

On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
 1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
 database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Length',
  value = length(v_status));

-- authenticate with twitter user/pass
UTL_HTTP.SET_AUTHENTICATION(
  r = v_req,
  username = p_user,
  password = p_pwd );

-- Send the update
UTL_HTTP.WRITE_TEXT(
  r = v_req,
  data = v_status );

UTL_HTTP.end_request (v_req);

RETURN TRUE;

  EXCEPTION
-- normal exception when reading the response
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.end_request (v_req);
  RETURN TRUE;

-- Anything else and send false
WHEN OTHERS THEN
  UTL_HTTP.end_request (v_req);
  Dbms_Output.Put_Line ( 'Request_Failed: ' ||
 Utl_Http.Get_Detailed_Sqlerrm );
  Dbms_Output.Put_Line ( 'Ora: ' || Sqlerrm );
 RETURN FALSE;

  END;

 END tweet;



 Thanks




-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris


Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-15 Thread Eric Mortensen
Unfortunately not.  Do you have anything else that might explain it?

On Thu, Jul 15, 2010 at 1:48 PM, Matt Harris thematthar...@twitter.comwrote:

 Hi Eric,

 In addition to the API Rate Limits there are general usage limits which
 apply to all of Twitter, including the website. These limits restrict
 various actions including the number of updates that can be posted per day.

 You can read more about Twitter Limits on our help website:
 http://support.twitter.com/forums/10711/entries/15364

 Hope that answers your question,
 Matt


 On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
 1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
 database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Length',
  value = length(v_status));

-- authenticate with twitter user/pass
UTL_HTTP.SET_AUTHENTICATION(
  r = v_req,
  username = p_user,
  password = p_pwd );

-- Send the update
UTL_HTTP.WRITE_TEXT(
  r = v_req,
  data = v_status );

UTL_HTTP.end_request (v_req);

RETURN TRUE;

  EXCEPTION
-- normal exception when reading the response
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.end_request (v_req);
  RETURN TRUE;

-- Anything else and send false
WHEN OTHERS THEN
  UTL_HTTP.end_request (v_req);
  Dbms_Output.Put_Line ( 'Request_Failed: ' ||
 Utl_Http.Get_Detailed_Sqlerrm );
  Dbms_Output.Put_Line ( 'Ora: ' || Sqlerrm );
 RETURN FALSE;

  END;

 END tweet;



 Thanks




 --


 Matt Harris
 Developer Advocate, Twitter
 http://twitter.com/themattharris



Re: [twitter-dev] API HTTP Post statuses/update.xml

2010-07-15 Thread Matt Harris
Hey Eric,

Sorry that help article didn't answer your question. Can you provide the
actual HTTP request being made and the HTTP response you get back? We're
interested in the response body content in particular.

Also, remember we disable basic authentication on August 16th so you want to
switch to that method of authentication now.

Matt

On Thu, Jul 15, 2010 at 12:46 PM, Eric Mortensen emort...@gmail.com wrote:

 Unfortunately not.  Do you have anything else that might explain it?


 On Thu, Jul 15, 2010 at 1:48 PM, Matt Harris thematthar...@twitter.comwrote:

 Hi Eric,

 In addition to the API Rate Limits there are general usage limits which
 apply to all of Twitter, including the website. These limits restrict
 various actions including the number of updates that can be posted per day.

 You can read more about Twitter Limits on our help website:
 http://support.twitter.com/forums/10711/entries/15364

 Hope that answers your question,
 Matt


 On Thu, Jul 15, 2010 at 10:11 AM, Eric emort...@gmail.com wrote:

 It appears that I am hitting a 150 post rate limit when I use the
 statuses/update.xml api to update a twitter account eventhough I
 should not have this limit doing only a post. Is there a reason why?
 Here is the code I am using from oracle to do this:

 create or replace PACKAGE BODY tweet
 AS

  twit_host VARCHAR2(255) := 'api.twitter.com';
  twit_protocol VARCHAR2(10) := 'http://';

  -- URL for status updates
  tweet_url VARCHAR2(255) := '/1/statuses/update.xml';


  FUNCTION tweet
(
  p_user IN VARCHAR2,
  p_pwd IN VARCHAR2,
  p_string IN VARCHAR2,
  p_proxy_url IN VARCHAR2 DEFAULT NULL,
  p_no_domains IN VARCHAR2 DEFAULT NULL )
RETURN BOOLEAN
  AS
v_req   UTL_HTTP.REQ;  -- HTTP request ID
v_resp  UTL_HTTP.RESP;  -- HTTP response ID
v_value VARCHAR2(1024); -- HTTP response data
v_status VARCHAR2(160);   -- Status of the request
v_call VARCHAR2(2000);  -- The request URL
v_log_value varchar2(4000) := 'status';
  BEGIN

-- Twitter update url
v_call := twit_protocol ||
  twit_host ||
  tweet_url;

-- encoded status string
v_status := utl_url.escape(
  url = 'status=' || SUBSTR( short_url.encode_text(p_string) ,
 1,140));

-- Authenticate via proxy
-- Proxy string looks like 'http://username:passw...@proxy.com'
-- p_no_domains is a list of domains not to use the proxy for
-- These settings override the defaults that are configured at the
 database level
IF p_proxy_url IS NOT NULL
THEN
  Utl_Http.set_proxy (
proxy = p_proxy_url,
no_proxy_domains  = p_no_domains
);
END IF;

-- Has to be a POST for status update
v_req := UTL_HTTP.BEGIN_REQUEST(
  url = v_call,
  method ='POST');

-- Pretend we're a moz browser
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'User-Agent',
  value = 'Mozilla/4.0');

-- Pretend we're coming from an html form
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Type',
  value = 'application/x-www-form-urlencoded');

-- Set the length of the input
UTL_HTTP.SET_HEADER(
  r = v_req,
  name = 'Content-Length',
  value = length(v_status));

-- authenticate with twitter user/pass
UTL_HTTP.SET_AUTHENTICATION(
  r = v_req,
  username = p_user,
  password = p_pwd );

-- Send the update
UTL_HTTP.WRITE_TEXT(
  r = v_req,
  data = v_status );

UTL_HTTP.end_request (v_req);

RETURN TRUE;

  EXCEPTION
-- normal exception when reading the response
WHEN UTL_HTTP.END_OF_BODY THEN
UTL_HTTP.end_request (v_req);
  RETURN TRUE;

-- Anything else and send false
WHEN OTHERS THEN
  UTL_HTTP.end_request (v_req);
  Dbms_Output.Put_Line ( 'Request_Failed: ' ||
 Utl_Http.Get_Detailed_Sqlerrm );
  Dbms_Output.Put_Line ( 'Ora: ' || Sqlerrm );
 RETURN FALSE;

  END;

 END tweet;



 Thanks




 --


 Matt Harris
 Developer Advocate, Twitter
 http://twitter.com/themattharris





-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris