
I updated the httprequest function to this: private function httpRequest($url, $parameters) I still was unable to get my own CURL up and running, but I managed to hack a few lines of code in DPZFlickr's library to get that working. This question and answer got me going in the right direction. $oauth_header = "oauth_consumer_key=".$apiKey.",oauth_nonce=".$oauth_nonce.",oauth_signature_method=".$signatureMethod.",oauth_timestamp=".$timestamp.",oauth_token=".$oauthToken.",oauth_version=".$oauthVersion.",oauth_signature=".$apiSignature Ĭurl_setopt($curl, CURLOPT_HTTPHEADER, array("Authorization: OAuth ".$oauth_header)) Ĭurl_setopt($curl, CURLOPT_RETURNTRANSFER, true) Ĭurl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST") Ĭurl_setopt($curl, CURLOPT_POSTFIELDS, $postFields) Ĭurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false) Ĭurl_setopt($curl, CURLOPT_SAFE_UPLOAD, true) $postFields = new \CurlFile($filePath, mime_content_type ( $filePath ), 'photo') $apiSignature = base64_encode(hash_hmac('sha1', $baseString, $hashkey, true)) $hashkey = $consumerSecret."&".$oauthTokenSecret = "&oauth_version=".$oauthVersion."&title=".$text = "&oauth_signature_method=".$signatureMethod."&oauth_timestamp=".$timestamp."&oauth_token=".$oauthToken $parms = "description=".$text."&format=json&oauth_consumer_key=".$apiKey."&oauth_nonce=".$oauth_nonce Here's the full code I use for creating my CURL request (edited to use CurlFile): $consumerSecret = $flickrApiSecret I've rolled my own CURL, which returns this: Upload result: HTTP/1.1 200 OK Date: Wed, 16:09:39 GMT Content-Type: text/xml charset=utf-8 Content-Length: 109 P3P: policyref="", CP="CAO. Inspecting the Flickr API's response, it's the same as what is returned when trying Dantsu's version of phpFlickr, which returns this: oauth_problem=signature_invalid&debug_sbs=. I've tried DPZFlickr, which returns this, when trying to upload: Array ( => fail => Array ( ) )


I'm trying to do this in a web-based application running PHP.

I'm unable to upload an image to Flickr using the Flickr API.
