我收到此错误
Invalid auth/bad request (got a 403, expected HTTP/1.1 20X or a redirect) at this line
$data = $oauthc->fetch($url, $body, $method, $headers);
当我使用这段代码时
try {
$oauthc = new \OAuth(CUSTOMER_KEY, CUSTOMER_SECRET,
OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_URI);
$oauthc->enableDebug();
$oauthc->setNonce(rand());
$url = 'https://api.linkedin.com/v1/jobs';
$body = file_get_contents('http://azaidi-usweb-08.vps.zulily.com/job.xml');
$method = OAUTH_HTTP_METHOD_POST;
$headers = array('Content-Type' => 'text/xml');
$data = $oauthc->fetch($url, $body, $method, $headers);
$response = $oauthc->getLastResponse();
$response_info = $oauthc->getLastResponseInfo();
print "<pre>";
print_r($oauthc->debugInfo);
print_r($response);
print_r($response_info);
print "</pre>";
exit;
}catch(OAuthException $e) {
print_r($oauthc->debugInfo);
print_r($e);
exit;
}
任何帮助将不胜感激