(PECL OAuth >= 0.99.1)
OAuth::fetch — Obtiene un recurso protegido por OAuth
$protected_resource_url
   [, array $extra_parameters
   [, string $http_method
   [, array $http_headers
  ]]] ) : mixedObtiene un recurso.
protected_resource_urlURL del recurso OAuth protegio.
extra_parametersParámetros adicionales para enviar con la petición del recurso.
http_method
       Una de las OAUTH_HTTP_METHOD_*
       constantes OAUTH, which includes
       GET, POST, PUT, HEAD, or DELETE.
      
       HEAD (OAUTH_HTTP_METHOD_HEAD) can be useful for
       discovering information prior to the request (if OAuth credentials are
       in the Authorization header).
      
http_headersEncabezados cliente HTTP (como por ejemplo User-Agent, Accept, etc.)
   Devuelve TRUE en caso de éxito o FALSE en caso de error.
  
| Versión | Descripción | 
|---|---|
| 1.0.0 | Antes devolvía NULLen caso de falla, en lugar deFALSE. | 
| 0.99.5 | El parámetro http_methodfue agregado | 
| 0.99.8 | El parámetro http_headersfue agregado | 
Ejemplo #1 Ejemplo de OAuth::fetch()
<?php
try {
    $oauth = new OAuth("consumer_key","consumer_secret",OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_AUTHORIZATION);
    $oauth->setToken("access_token","access_token_secret");
    $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 "Excepción atrapada!\n";
    echo "Respuesta: ". $E->lastResponse . "\n";
}
?>