the code is what I posted above...

My goal is a simple twitterbot that tweets hourly a string I tell it
to tweet. Worked fine in the userid/password days, now it doesn't
anymore thanks to oauth. I'm not trying to have other users use the
app in their name (which is what oauth is for), i just want a simple
api call to tweet to 'my own account'. All this difficult s...@t to make
that work isn't really my cup of tea.... If you can help me make this
work, thanks a lot: so there's one script that creates the string and
puts the keys in the environment. Here's the current code of the
script that uses that info to tweet:

use Net::Twitter;

$wikiurl = $ENV{iurl};
$wikitxt = $ENV{itxt};

$wikckey = $ENV{ckey};
$wikcsec = $ENV{csec};
$wikatok = $ENV{atok};
$wikasec = $ENV{asec};

print "keys are\n";
print "$ckey\n";
print "$csec\n";
print "$atok\n";
print "$asec\n";

my $client = Net::Twitter->new(
    traits => ['OAuth', 'API::REST'],
    consumer_key => $ckey,
    consumer_secret => $csec,
    access_token => $atok,
    access_secret => $asec,

binmode STDOUT, ":utf8";

$tweet = $iurl." ".$itxt;
print "$tweet\n";

my $res = $client->update({ status => $tweet });

print "Tweeted:$res->{user}{screen_name}/status/$res->{id}\n";

still get 'Could not authenticate you.'

I don't get it. The keys are good as far as I can see. (i don't make
typo's with copy paste...) Interestingly, it doesn't print the last
line either...

what am I doing wrong?

On Sep 23, 8:14 am, Marc Mims <> wrote:
> * wkossen <> [100922 06:09]:
> > Added the traits bit, now I get 'Could not authenticate you.'.   help?
> Have you verified your credentials (consumer key/secret, access
> token/secret)?  If you can email me some code (sans credentials) I'd be
> happy to take a look at it.
>         -Marc

Twitter developer documentation and resources:
API updates via Twitter:
Issues/Enhancements Tracker:
Change your membership to this group:

Reply via email to