Vyacheslav Slinko

Authrorize header must start with OAuth not Bearer

http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-5.1.1
@@ -298,7 +298,7 @@ class OAuth2_Service @@ -298,7 +298,7 @@ class OAuth2_Service
298 $endpoint .= (strpos($endpoint, '?') !== false ? '&' : '?') . http_build_query($uriParameters); 298 $endpoint .= (strpos($endpoint, '?') !== false ? '&' : '?') . http_build_query($uriParameters);
299 } 299 }
300 300
301 - $headers = array_merge(array('Authorization: Bearer ' . $token->getAccessToken()), $additionalHeaders); 301 + $headers = array_merge(array('Authorization: OAuth ' . $token->getAccessToken()), $additionalHeaders);
302 302
303 $http = new OAuth2_HttpClient($endpoint, $method, $parameters, $headers); 303 $http = new OAuth2_HttpClient($endpoint, $method, $parameters, $headers);
304 $http->execute(); 304 $http->execute();