Thread Twittern mit Perl und Oauth
(10 answers)
Opened by Lars at 2010-09-02 23:50
Ohne es getestet zu haben. Versuch es mal so:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 my %oauth=( 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, ); my $oauth_str=join(", ", map{$_=qq($_="$oauth{$_}")} sort keys(%oauth)); my $request = HTTP::Request->new(POST => $api_url); $request->header( Authorization => 'OAuth realm="https://api.twitter.com/oauth/ ,'.$oauth_str, status => $status, ); $request->content_type("application/x-www-form-urlencoded"); my $res = $ua->request($request); |