Re: [twitter-dev] Frequent errors when using OAuth, none when using basic

2010-08-02 Thread Matt Harris
Hey Charles,

With the amount of traffic passing through Twitter processing and looking at
our logs for instances were an error occurred is not feasible. I'm more than
happy to help work out the issue you are having though.

What would be really helpful is an example of the base signature string and
post parameters you were trying to send when you got the error, and the same
information for the Tweet before it which worked. I can then take a look and
see if anything jumps out.

Please remember to remove any passwords and consumer or user secrets before
posting.

Best,
Matt

On Mon, Aug 2, 2010 at 5:32 PM, Charles wrote:

> I sent the following to Twitter support via their web form; they
> suggested I should post here instead.
>
> -
> I currently have two automated accounts, thethirdstroke and this one
> (servologyalerts).  thethirdstroke tweets every hour on the hour, and
> has been working fine for a long time.  I converted it to using OAuth
> a while ago, and it continued to work fine.  servologyalerts tweets
> when my nagios installation detects a fault or a fault clears, and has
> been having problems since I switched it from password authentication
> to OAuth on 12 July.
>
> Since that time, most attempts to tweet get the "Something is
> technically wrong" response.  However, most test tweets seem to go
> through without any problem, and reviewing the logs I notice that any
> alert which is long enough that my script has to truncate it to 140
> characters before tweeting, and therefore loses (part of) the "packet
> loss = nnn%" which is often at the end of the tweet, goes through
> fine.  I wonder if the problem is that my alerts are somehow
> triggering spam filtering, which is then returning a "Something is
> technically wrong" error message rather than actually saying it's spam
> filtering.  That doesn't seem a likely explanation, though, as the
> problem started precisely when I switched from basic auth to OAuth -
> surely OAuth would, if anything, need to do *less* spam filtering.
>
> Both automated accounts tweet using the same script, which uses curl
> to post through a python program called oauth-proxy, which I have
> altered to listen only on the loopback interface, and which is started
> up just before each tweet and shut down just afterwards.  As
> mentioned, there doesn't seem to be any problem with the OAuth signing
> - thethirdstroke posts fine pretty much all the time, while
> servologyalerts can post test messages and, occasionally, live
> messages with no problems.  It also does not seem to be a problem with
> OAuth signing requests containing % signs, as I've posted test
> messages with % signs with no problem.
>
> I'd be grateful if you could check any logs you have and let me know
> if you can see why this problem occurs, and if you can suggest a fix.
> Thanks for your help.
> -
>
> Update: I have temporarily switched back to using basic authentication
> for servologyalerts; the errors have stopped and notifications arrive
> on twitter as expected.
>
> Thanks for any light you can shed; and let me know if more information
> is needed - I didn't think there was any need to copy-and-paste the
> "Something is technically wrong" page's HTML here, for example.
>



-- 


Matt Harris
Developer Advocate, Twitter
http://twitter.com/themattharris


[twitter-dev] Frequent errors when using OAuth, none when using basic

2010-08-02 Thread Charles
I sent the following to Twitter support via their web form; they
suggested I should post here instead.

-
I currently have two automated accounts, thethirdstroke and this one
(servologyalerts).  thethirdstroke tweets every hour on the hour, and
has been working fine for a long time.  I converted it to using OAuth
a while ago, and it continued to work fine.  servologyalerts tweets
when my nagios installation detects a fault or a fault clears, and has
been having problems since I switched it from password authentication
to OAuth on 12 July.

Since that time, most attempts to tweet get the "Something is
technically wrong" response.  However, most test tweets seem to go
through without any problem, and reviewing the logs I notice that any
alert which is long enough that my script has to truncate it to 140
characters before tweeting, and therefore loses (part of) the "packet
loss = nnn%" which is often at the end of the tweet, goes through
fine.  I wonder if the problem is that my alerts are somehow
triggering spam filtering, which is then returning a "Something is
technically wrong" error message rather than actually saying it's spam
filtering.  That doesn't seem a likely explanation, though, as the
problem started precisely when I switched from basic auth to OAuth -
surely OAuth would, if anything, need to do *less* spam filtering.

Both automated accounts tweet using the same script, which uses curl
to post through a python program called oauth-proxy, which I have
altered to listen only on the loopback interface, and which is started
up just before each tweet and shut down just afterwards.  As
mentioned, there doesn't seem to be any problem with the OAuth signing
- thethirdstroke posts fine pretty much all the time, while
servologyalerts can post test messages and, occasionally, live
messages with no problems.  It also does not seem to be a problem with
OAuth signing requests containing % signs, as I've posted test
messages with % signs with no problem.

I'd be grateful if you could check any logs you have and let me know
if you can see why this problem occurs, and if you can suggest a fix.
Thanks for your help.
-

Update: I have temporarily switched back to using basic authentication
for servologyalerts; the errors have stopped and notifications arrive
on twitter as expected.

Thanks for any light you can shed; and let me know if more information
is needed - I didn't think there was any need to copy-and-paste the
"Something is technically wrong" page's HTML here, for example.