My program sends is using rate_limit_status.xml to get the number of
remaining hits until the account limit is exceeded. My problem is that
it always seems to return the same value: 150. Even once I have
already hit the limit the service continues to show 150 hits left. I
am thinking that it is returning the hits remaining for the IP address
and not the user account I need.

Any ideas? I've been trying to figure this out all night but I haven't
been able to find to many examples of the rate_limit_status.xml
service. Here is my code:

string logon=this.UserName + ":" + this.Password;

HttpWebRequest req=(HttpWebRequest)WebRequest.Create(url);
req.Headers.Add("Authorization","Basic " + logon);

HttpWebResponse resp=(HttpWebResponse)req.GetResponse();
StreamReader sr=new StreamReader(resp.GetResponseStream

//get results

The code XML response from twitter is:

<?xml version="1.0" encoding="UTF-8"?>
  <remaining-hits type="integer">150</remaining-hits>
  <hourly-limit type="integer">150</hourly-limit>
  <reset-time-in-seconds type="integer">1257786363</reset-time-in-
  <reset-time type="datetime">2009-11-09T17:06:03+00:00</reset-time>

Reply via email to