I am really getting confused. I did not show the base string, as I
believe it is only used to caclulate the signature, but it looks like
this:

POST&http%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses
%2Fupdate.xml&oauth_consumer_key%3DMUCONSUMERKEY%26oauth_nonce
%3DBy0mBhrkliegb29E2gek6japm6Cqkg4wiuoy0834d%26oauth_signature_method
%3DHMAC-SHA1%26oauth_timestamp%3D1285028392%26oauth_token%MYOAUTHTOKEN
%26oauth_version%3D1.0%26status%3Dtesting

Combining this with the composite signing key and base64 encoding
gives me the oauth signature.

Following this, it is my understanding that two lines are needed. One
with the url and one with the authorization haeder as shown above....


On Sep 21, 12:30 am, Tom van der Woerdt <i...@tvdw.eu> wrote:
> Bad: xml.setRequestHeader "Authorization", "OAuth" & Cells(17, 3)
> Good: xml.setRequestHeader "Authorization", "OAuth " & Cells(17, 3)
>
> Also, if I am not mistaken, %22 is " and I definitely see those in your
> Base String ;-) I'm not saying that it's impossible to have them there,
> just that it's very unlikely that you need them there.
>
> Also, like Taylor pointed out: there's no status= in your base string ;-)
>
> Tom
>
> On 9/21/10 12:22 AM, Randomness wrote:
>
>
>
> > I don't see where the space is missing..
> > I did not put quotes in the base string. I assume that it only serves
> > as a way to claculate an oauth signature, which is calculated exactly
> > as by your website and by twitter.
>
> > Still stuck....
>
> > On Sep 21, 12:16 am, Tom van der Woerdt <i...@tvdw.eu> wrote:
> >> Multiple things:
> >>  * You missed a space in the Authorization header. Go look in my post ;)
> >>  * You don't have to put the quotes in the Base String. Only in the
> >> Authorization: header.
>
> >> Tom
>
> >> On 9/21/10 12:14 AM, Randomness wrote:
>
> >>> I still get the same mistake all the time, after I get asked and
> >>> cancel for a username and password:
>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>> <errors>
> >>>   <error code="32">Could not authenticate you</error> </errors>
>
> >>> The xml part of the VBA now looks like this:
>
> >>> Set xml = CreateObject("MSXML2.XMLHTTP") xml.Open "POST", Cells(18,
> >>> 3), False xml.setRequestHeader "Authorization", "OAuth" & Cells(17, 3)
> >>> xml.Send tResult = xml.responsetext Cells(7, 5) = tResult Debug.Print
> >>> tResult Set xml = Nothing
>
> >>> Cells(18,3) =http://api.twitter.com/1/statuses/update.xml?status=testing
> >>> I believe calling it this way does not need quotes, because it is
> >>> already called as a string.
>
> >>> I changed the authorization header.
>
> >>> I put quotes around the values and url encoded the values. Cells(17,3)
> >>> now looks like this:
>
> >>> oauth_consumer_key%3D%22MYCONSUMERKEY%22%2Coauth_token%3D%MYOAUTHTOKEN
> >>> %22%2Coauth_signature_method %3D%22HMAC-SHA1%22%2Coauth_signature%3D
> >>> %22AXBM9Mpc2k3+/jYGTvs/JE4G8BQ=%22%2Coauth_timestamp%3D
> >>> %221285025757%22%2Coauth_nonce%3D
> >>> %22slnbcv0vxt1gzwfDz2Celv2ojcpqabyxoEB9sEal4%22%2Coauth_version%3D
> >>> %221.0%22
>
> >>> When calculating signatures I get the exact same values as are
> >>> calculated on your Quonos site. They are also the same as calculated
> >>> with the examples given by Twitter.
>
> >>> This is a tough nut to crack! :-)
>
> >>> On Sep 20, 9:06 pm, Tom van der Woerdt <i...@tvdw.eu> wrote:
> >>>> Hi,
>
> >>>> I see multiple things that are wrong:
> >>>>  * You didn't put quotes around your URL
> >>>>  * You shouldn't send OAuth: as an header. The header is Authorization:
> >>>> OAuth <headerstring>. (xml.setRequestHeader "Authorization", "OAuth " &
> >>>> headerstring
> >>>>  * You should put quotes around the values in headerstring, and if you
> >>>> haven't done so already, URLencode the values
> >>>>  * There's no signature in headerstring
>
> >>>> If you changed those, and it still doesn't work, please give these :
> >>>>  * A sample Base String
> >>>>  * A TCP dump of a full request, including response.
>
> >>>> Tom
>
> >>>> PS: Do I know you?
>
> >>>> On 9/20/10 8:38 PM, Randomness wrote:
>
> >>>>> I believe I have solved all the issues of getting the right
> >>>>> information to send a tweet using Excel. Calculation of oauth_nonce
> >>>>> and oauth_timestamp look good and also the calculation of the
> >>>>> oath_signature seems to be in order.
>
> >>>>> When I try to post the message I get a message asking for user name
> >>>>> and password and when I cancel this I get an error 32.
>
> >>>>> I am doing the following:
>
> >>>>> Set xml = CreateObject("MSXML2.XMLHTTP")
> >>>>> xml.Open "POST",http://api.twitter.com/1/statuses/update.xml?status=text
> >>>>> of the update, False
> >>>>> xml.setRequestHeader "OAuth", headerstring
> >>>>> xml.Send
> >>>>> tResult = xml.responsetext
> >>>>> Debug.Print tResult
> >>>>> Set xml = Nothing
>
> >>>>> headerstring="oauth_consumer_key=myconsumerkey,
> >>>>>                      oauth_token=mytoken,
> >>>>>                      oauth_signature_method =HMAC-SHA1,
> >>>>>                      oauth_signature=calculatedsignature,
> >>>>>                      oauth_timestamp=1285014608,
>
> >>>>> oauth_nonce=81A1iuux8jzxgieaxmmp3ta2bDdqefd88hp9soo31,
> >>>>>                      oauth_version=1.0"
>
> >>>>> Any help wouldbe appreciated because I am really stuck.- Hide quoted 
> >>>>> text -
>
> >>>> - Show quoted text -- Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en

Reply via email to