[twitter-dev] Re: Question About Post Commands

2009-08-07 Thread Dan Kurszewski

My issue is the amount of time it takes to do a certain number of
friendship/destroy and friendship/create calls.  Right now I am using
the code from the original post.

Would the oAuth speed this up versus the posts that I am doing?

Does anyone else know a way to speed up a larger group of API calls?

Thanks,
Dan


[twitter-dev] Question About Post Commands

2009-08-06 Thread Dan Kurszewski

Does anyone know if there is a way with VB.Net or C# to login to
twitter, call 100 post commands, and then logout?

Here is my code for making a single post command in VB.Net.  As you
can see every time I call this function it has to login.  I would love
to have an array of url's and/or data that need to be processed for
the same username and password and having only one login.  I have
tried rearranging things several different ways with no luck.

Any help would be greatly appreciated.

---

Public Function ExecutePostCommand(ByVal url As String, ByVal
username As String, ByVal password As String, _
ByVal data As String) As String

Try
Dim request As HttpWebRequest = HttpWebRequest.Create(url)
request.ServicePoint.Expect100Continue = False

If Not String.IsNullOrEmpty(username) And Not
String.IsNullOrEmpty(password) Then
request.Credentials = New NetworkCredential(username,
password)
request.ContentType = application/x-www-form-
urlencoded
request.Method = POST

Dim bytes As Byte() = Encoding.UTF8.GetBytes(data)

request.ContentLength = bytes.Length

Dim s As Stream
s = request.GetRequestStream
s.Write(bytes, 0, bytes.Length)

Dim r As HttpWebResponse
r = request.GetResponse

Dim sr As StreamReader
sr = New StreamReader(r.GetResponseStream)

Return sr.ReadToEnd

Else
Throw New Exception(Username or Password is Null)
End If

Catch ex As Exception
Throw ex
End Try

End Function



[twitter-dev] Re: Please Help - Brand New (403) Forbidden Errors

2009-08-04 Thread Dan Kurszewski

This is Basic Auth.

Dan


[twitter-dev] Re: Please Help - Brand New (403) Forbidden Errors

2009-08-04 Thread Dan Kurszewski

Here is what is happening.  I am trying to create an app that runs on
my desktop.  It does a friendships/destroy on people that have chosen
not to follow me and does a friendships/create on people who are
following me that I have yet to follow.  This is supposed to be
similar to Twitter Karma.

Because I am in the development phase, I have had to do a lot of
testing.  Here are the steps I take to test.

1. I login in to Twitter via IE and add pick a handful of people to
follow.
2. I then go to my desktop app and click on a button and the process
starts.
3. The app does what it does and then I have the perfect number of
followers and friends (with the exception of followers who are no
longer allowed users).  By doing this it makes sure I never reach my
follower limits.
4. I do it again and again and again and 
5. After a while I start getting the 403 errors.

So my questions are this.
1. Is there a limit to how many times I can do friendships/destroy or
friendships/create?  According to the API documentation, neither of
these apply towards the rate limit.
2. Is there a limit to the number of times a certain username can
login to Twitter in an hour, a day, etc?
3. Is there a limit to the number of times calls like this are made by
a certain IP address?

Any help would be greatly appreciated.


[twitter-dev] Re: Please Help - Brand New (403) Forbidden Errors

2009-08-04 Thread Dan Kurszewski

Does anyone know the limit to friendship create/destroy calls per
hour, per day, etc?  There has to be a number out there somewhere.  If
I knew this number than I could have a counter that stops once the
limit is reached.

Thanks,
Dan


[twitter-dev] follwers ids and friends ids

2009-08-03 Thread Dan Kurszewski

I am having problems with the followers ids and friends ids calls.

reprosites has 6318 friends and 5960 followers.

If I do a regular call with no paging I get the proper results.

But if I page some wierd stuff happens.

http://twitter.com/friends/ids/reprosites.xml?page=1 returns 5000
results like expected.
http://twitter.com/friends/ids/reprosites.xml?page=2 returns nothing
when it should at least have some results.

http://twitter.com/followers/ids/reprosites.xml?page=1 returns 5000
results like expected.
http://twitter.com/followers/ids/reprosites.xml?page=2 returns nothing
when it should at least have some results.

Could someone please let me know what I am doing wrong?

Dan


[twitter-dev] Please Help - Brand New (403) Forbidden Errors

2009-08-03 Thread Dan Kurszewski

I have all of a sudden started getting The remote server returned an
error: (403) Forbidden any time I try to destroy a friend or add a
friend.  This all worked fine for the past couple of days.

Can anyone explain what might be happening?

Thanks,
Dan