Why aren't my answers to Tom being displayed?

I based my program on the exmaples I found under 
http://apiwiki.twitter.com/OAuth-Examples
especially on the example of Scott Carter 
http://www.social.com/main/twitter-oauth-using-perl/.
I followed his comment:

# Add padding character to make a multiple of 4 per the
    # requirement of OAuth.
    $signature .= "=";

> I also noticed that you don't URL encode the values in $content. If I
> recall correctly, you have to URL encode those as well.

I think I do encode them with

my $signature_base_str = "POST&" . uri_escape_RFC3986($api_url) .
"&" . uri_escape_RFC3986($content);

correct?

> If that was not the issue, then please show your Base String and the
> HTTP request.

This is the base string:

POST&http%3A%2F2Fapi.twitter.com%2F1%2Fstatuses
%2Fupdate.json&oauth_consumer_key%3DXXX%26oauth_nonce
%3D10000000001%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1272325550%26oauth_token%3DXXX%26oauth_version%3D1.0%26status
%3DHello%20world

What do you mean with show us the HTTP request. I think I am doing the
HTTP request with

my $ua = LWP::UserAgent->new;
my $req = POST($api_url => [
           oauth_nonce => $oauth_nonce,
           oauth_signature_method => $oauth_signature_method,
           oauth_timestamp => $oauth_timestamp,
           oauth_consumer_key => $oauth_consumer_key,
           oauth_token => $oauth_token,
           oauth_signature => $signature,
           oauth_version => $oauth_version,
           status => $status
           ]);

# Make the request
my $res = $ua->request($req);

On 3 Sep., 00:23, Lars <lars_sa...@hotmail.com> wrote:
> Sorry, I don't habe shell access...
>
> On 3 Sep., 00:20, Marc Mims <marc.m...@gmail.com> wrote:
>
>
>
> > > I am not a Perl expert but I have developed a small web page with Perl
> > > which is somewhat popular in Germany (according to Alexa trafic rank <
> > > 1000). And this web site is tweeting important events using its own
> > > twitter account.
>
> > > I tried for days but I am not able to get it working (tweeting) again.
>
> > > I registered my web page/application and want to use my access tokens
> > > "oauth_token" and "oauth_token_secret" which I find under my
> > > application settings because I am using only this twitter account to
> > > tweet (seehttp://dev.twitter.com/pages/oauth_single_token)
>
> > > But the response is always "401 Unauthorized"!
>
> > > Any ideas?
>
> > > My Perl program looks like this (my provider does not offer the module
> > > NET::Twitter)
>
> > If you have shell access, you can probably install local::lib using the
> > bootstrap method, then install Net::Twitter or Net::Twitter::Lite in
> > your own directory.
>
> >         -Marc

-- 
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