Yes. What's interesting about this is that my authentication function works for getting and posting updates on my personal timeline.
On Apr 6, 12:39 pm, Doug Williams <[email protected]> wrote: > What message accompanied the 403 response code? > > Doug Williams > Twitter API Supporthttp://twitter.com/dougw > > > > On Sun, Apr 5, 2009 at 11:12 AM, DIENECES <[email protected]> wrote: > > > That's a great suggestion. Thanks for the help. I"ll post my modified > > code in case anyone else wants some VB (even though it seems to be the > > black-sheep) of the twitter development family ;). > > > On Apr 5, 12:21 am, James Deville <[email protected]> wrote: > >> Look at what requests you are sending with Netmon or Wireshark. With Witty > >> (C# wpf app), we discovered that first an unauthenticated request is sent > >> to > >> find out what auth the server takes, then a authenticated request after > >> that. This doesn't work on some of the API requests. The solution is to > >> manually attach the BasicAuth header. > > >> JD > > >> On Sat, Apr 4, 2009 at 11:38 AM, DIENECES <[email protected]> wrote: > > >> > Any idea why I'm forbidden? > >> > Thanks in advance! > >> > Function writeMessage(ByVal StrPass, ByVal StrUser, ByVal StrMessage, > >> > ByVal StrTo) As String > >> > Dim req As System.Net.HttpWebRequest = > >> > System.Net.HttpWebRequest.Create("http://twitter.com/direct_messages/ > >> > new.xml?user= <http://twitter.com/direct_messages/%0Anew.xml?user=>" + > >> > StrTo + "&text=" + StrMessage) > >> > If Not StrUser = "" Or StrPass = "" Then > >> > req.Credentials = New System.Net.NetworkCredential > >> > (StrUser, StrPass) > >> > req.Method = "POST" > >> > 'req.ContentLength = 0 > >> > 'req.ServicePoint.Expect100Continue = False > >> > req.ContentType = "application/x-www-form-urlencoded" > >> > 'req.PreAuthenticate = True > >> > Dim resp As HttpWebResponse = req.GetResponse() > >> > Dim sr As New System.IO.StreamReader(resp.GetResponseStream > >> > ()) > >> > 'sr.Read(req.GetResponse(), ) > >> > Return sr.ReadToEnd() > >> > End If > > >> > End Function- Hide quoted text - > > >> - Show quoted text -- Hide quoted text - > > - Show quoted text -
