|
![Picture of Luesak Luesukprasert Picture of Luesak Luesukprasert](/graphics/unknown.gif) Luesak Luesukprasert - 2014-10-13 03:03:43
Manuel,
On this line:
if (!$this->Sign($url, $method, $parameters, $oauth, $request_content_type, $value_parameters, count($files) !== 0, IsSet($options['PostValuesInUR
in SendAPIRqeuest... initially I got $value_parameters is undefined.
so I went ahead and added $value_parameters = array() right at the top of the function. After I did that I got the error:
oauth_problem=parameter_absent&oauth_parameters_absent=oa
Please help!
Thanks
Kim
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2014-10-13 03:42:27 - In reply to message 1 from Luesak Luesukprasert
What is the code of the CallAPI call that you are using? Is it of some example script?
![Picture of Luesak Luesukprasert Picture of Luesak Luesukprasert](/graphics/unknown.gif) Luesak Luesukprasert - 2014-10-13 06:13:05 - In reply to message 2 from Manuel Lemos
Hi,
I'm running the demo login_with_flickr.php
All I did is put my key and secret.
This all used to work before the Sign isolation.
Thanks
Kim
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2014-10-13 07:47:35 - In reply to message 3 from Luesak Luesukprasert
Yes, the value parameters was not meant to be used outside that function but that was not the issue. For Flickr the request parameters need to be passed in the URL but the function was not taking the URL parameter by reference.
It is fixed in the version that I just uploaded. Just let me know if you find other issues.
![Picture of Luesak Luesukprasert Picture of Luesak Luesukprasert](/graphics/unknown.gif) Luesak Luesukprasert - 2014-10-13 09:42:44 - In reply to message 4 from Manuel Lemos
Thanks! Login seems to work now.
However, I'm trying to upload files but I'm getting invalid signature.. and Flickr document seems to be outdated!
I wonder if typically the access_token needs to be part of the parameter used in creating the oauth signature? Do you know? If so please help!
I've actually tried it both ways... including the access token into the parameters and not including... either way I get invalid signature! :(
Kim
![Picture of Luesak Luesukprasert Picture of Luesak Luesukprasert](/graphics/unknown.gif) Luesak Luesukprasert - 2014-10-13 09:44:01 - In reply to message 5 from Luesak Luesukprasert
This is what I get back from Flickr:
oauth_problem=signature_invalid&debug_sbs=POST&https://up.flickr.com/services/upload/&description=&hidden=2&is_public=1&oauth_consumer_key=e54e4c0361b434276577c924ec85f26f&oauth_nonce=fd3f8deb39763cdf833013a409bcf717&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1413193136&oauth_token=72157648140114859-7d9146a9cc40c398&oauth_version=1.0&safety_level=1&tags=&title=Stairs%201.png
![Picture of Luesak Luesukprasert Picture of Luesak Luesukprasert](/graphics/unknown.gif) Luesak Luesukprasert - 2014-10-13 09:55:26 - In reply to message 6 from Luesak Luesukprasert
GOT IT!!! UPLOAD SUCCESS...
Turns out...
BAD:
$oClient->Sign($sUrl, "POST", $oReqData, array(), "multipart/form-data", false, false, $sAuth, $aPostValues);
GOOD:
$oClient->Sign($sUrl, "POST", array(), $oReqData, "multipart/form-data", false, false, $sAuth, $aPostValues);
The 3rd and 4th param must be swapped... not sure if this is a problem or not.
![Picture of Manuel Lemos Picture of Manuel Lemos](/picture/user/1.jpg) Manuel Lemos - 2014-10-13 21:12:59 - In reply to message 7 from Luesak Luesukprasert
I am not sure what you are doing, but $parameters are for the API call and $oauth are OAuth 1 specific parameters.
|