Created
June 17, 2010 21:46
-
-
Save stevencorona/442831 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'HTTP/OAuth/Consumer.php'; | |
$r = new Http_Request2('http://api.twitpic.com/1/uploadAndPost.xml', Http_Request2::METHOD_POST); | |
$r->addPostParameter( 'consumer_token', '' ); | |
$r->addPostParameter( 'consumer_secret', '' ); | |
$r->addPostParameter( 'oauth_token', '' ); | |
$r->addPostParameter( 'oauth_secret', '' ); | |
$r->addPostParameter( 'message', '@mhp this is a test from the oauth api' ); | |
$r->addPostParameter( 'key', '' ); | |
$r->addUpload( "media", dirname(__FILE__) . '/assets/test_upload.png' ); | |
$res = $r->send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment