diff --git a/src/OAuth/OAuth1/Service/Flickr.php b/src/OAuth/OAuth1/Service/Flickr.php index 48c6a6dd..35f2e186 100644 --- a/src/OAuth/OAuth1/Service/Flickr.php +++ b/src/OAuth/OAuth1/Service/Flickr.php @@ -28,6 +28,11 @@ public function __construct( } } + public function getUploadServiceEndpoint() + { + return new Uri('https://www.flickr.com/services/oauth/request_token'); + } + public function getRequestTokenEndpoint() { return new Uri('https://www.flickr.com/services/oauth/request_token'); @@ -79,7 +84,9 @@ protected function parseAccessTokenResponse($responseBody) public function request($path, $method = 'GET', $body = null, array $extraHeaders = []) { $uri = $this->determineRequestUriFromPath('/', $this->baseApiUri); - $uri->addToQuery('method', $path); + if ($this->baseApiUri->getAbsoluteUri() !== $this->getUploadServiceEndpoint()->getAbsoluteUri()) { + $uri->addToQuery('method', $path); + } if (!empty($this->format)) { $uri->addToQuery('format', $this->format);