<?php
try {
$oauth = new OAuth("chave_consumidor","senha_consumidor",OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_AUTHORIZATION);
$oauth->setToken("token_acesso","senha_token_acesso");
$oauth->fetch("http://photos.example.net/photo?file=vacation.jpg");
$response_info = $oauth->getLastResponseInfo();
header("Content-Type: {$response_info["content_type"]}");
echo $oauth->getLastResponse();
} catch(OAuthException $E) {
echo "Exceção capturada!\n";
echo "Resposta: ". $E->lastResponse . "\n";
}
?>