I have uploaded a photo to twitpic and message to twitter using
Twitpic API. I am using the technology Perl.
Here is the code i am using:
my $oauth_sign = Net::OAuth->request('Access Token')->new(
consumer_key => $self->{'consumer_key'},
consumer_secret => $self->{'consumer_secret'},
token => $params{'oauth_token'},
token_secret => $params{'oauth_secret'},
signature_method => 'HMAC-SHA1',
timestamp => time(),
nonce => time() . '2323232323232323',
request_method => 'GET',
request_url => 'https://api.twitter.com/1/account/
verify_credentials.json'
);
$oauth_sign->sign;
my %uploadparams = (
'username' => 'XXXXXXXXXX',
'password' => "XXXXXXXXXx",
'message' => $params{'message'},
'media' => [$params{'file'}]
);
my %req_headers = (
'X-Verify-Credentials-Authorization' => $oauth_sign-
>to_authorization_header,
'X-Auth-Service-Provider' => 'https://api.twitter.com/1/account/
verify_credentials.json',
'Content-Type' => 'form-data'
);
my $request = POST('http://twitpic.com/api/uploadAndPost',\
%uploadparams,%req_headers);
my $response = $self->{ua}->request($request);
return $response;
I would like to remove the media uploaded and the message using api
call. Please let me know if there is an API call to do this
--
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