Hello again,

Solved it.

Reading pages upon pages of chats here helped... thanks for that.

As I suspected, the answer will boil down to a simple thing, and
indeed it was.  I found that having spaces in the text was causing the
problem so I removed these in my test and bingo, all worked.  However,
I then looked at how the URL encoding works for the spaces and it was
correct too, spaces show as %20.  So, further reading showed that in
fact the status needs to be URL encoded BEFORE it is added to the
signature base, and as such it will indeed be encoded twice.  (This is
not mentioned in the API documentation - I know it by heart now, well
almost).

So, in conclusion:
1. URL Encode the status string before you assemble the signature base
parts so that when these are put together it is url-encoded twice.
2. Read these pages much sooner in the process of OAuth
implementation... could save loads of time and stress
3. We now have an OAuth class for Domino LotusScript agents - and can
add this to various workflow apps

Ps, I am using a 3rd party DLL to create the Signature String and
convert the HEX result back to Base64.

Thanks,

On May 26, 10:41 pm, avitchi <[email protected]> wrote:
> Hello API people.
>
> I have a problem I hope someone can help me with.
>
> I have developed an OAuth class in IBM LotusScript which enables me to
> write tweets using background agents with the IBM Domino platform.  It
> was a steep learning curve but the class appears to work (at least in
> part).
>
> Now, today I managed to get my first status update to work and in the
> excitement I tried my code, which Twitter responded saying it was a
> duplicate - fair enough, it said "hello" only.  However, since then I
> can no longer get and status updates to work, I always get 
> "Incorrectsignature".
>
> To check that all the basics are correct, my code allows me to perform
> a Token Request tohttps://api.twitter.com/oauth/request_token.  This
> seems to always work and I never getsignatureissue.  And to confirm
> it works further I can confirm I am getting the correct oauth_token
> and oauth_token_secret.
>
> The problem appears when I try to do a direct status update 
> tohttps://api.twitter.com/1/statuses/update.json.  I have followed the
> API info and so far spent two solid days but cannot repeat a
> successful post.  Of course I have used the four required keys and
> secrets and verified that all the base strings are correct,signature
> calculations correct etc etc.  I just wonder if I am sending the
> "status=hello" correctly or what...
>
> Basically I am at a loss.  Can anyone help? desperation is setting in.
> Is there any additional info I can provide?

-- 
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
https://groups.google.com/forum/#!forum/twitter-development-talk

Reply via email to