themattharris/tmhOAuth — Issue #25: There was an error communicating with the delegator
Author: oosswwaalldd
Created: 2012-01-31 21:46:18+00:00
State: open

Hi, i need some help am using the latest version of the lib package, i am currently trying to post an image via twitpic with any success.

I am using the file: oauth_echo_twitpic.php,
my twitpic app key,
my twitter: consumer_key, consumer_secret, oauth_token and oauth_token _secret
a local file called 'welcome.png', in the same directory as oauth_echo_twitpic.php

and i get this error everytime: 'There was an error communicating with the delegator'

below print the result of the browser dump:

---------------------------------------------------------------- oauth_echo_twitpic.php output ------------------------------------------------------

There was an error communicating with the delegator
tmhOAuth Object
(
[params] => Array
(
)

[headers] => Array
(
[X-Auth-Service-Provider] => https://api.twitter.com/1/account/verify_credentials.json
[X-Verify-Credentials-Authorization] => OAuth oauth_consumer_key="****[removed]****", oauth_nonce="****[removed]****", oauth_signature="****[removed]****", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1328045719", oauth_token="****[removed]****", oauth_version="1.0"
[Expect] =>
)

[auto_fixed_time] =>
[buffer] =>
[config] => Array
(
[user_agent] => tmhOAuth 0.61+SSL - //github.com/themattharris/tmhOAuth
[use_ssl] => 1
[host] => api.twitter.com
[consumer_key] => ****[removed]****
[consumer_secret] => ****[removed]****
[user_token] => ****[removed]****
[user_secret] => ****[removed]****
[force_nonce] =>
[nonce] => dbccb6ca52b9ae2549b19a67a4cd373e
[force_timestamp] =>
[timestamp] => 1328045719
[oauth_version] => 1.0
[oauth_signature_method] => HMAC-SHA1
[curl_connecttimeout] => 30
[curl_timeout] => 10
[curl_ssl_verifyhost] => 2
[curl_ssl_verifypeer] => 1
[curl_cainfo] => /home/****[removed]****/public_html/cacert.pem
[curl_capath] => /home/****[removed]****/public_html
[curl_followlocation] =>
[curl_proxy] =>
[curl_proxyuserpwd] =>
[curl_encoding] =>
[is_streaming] =>
[streaming_eol] =>

[streaming_metrics_interval] => 60
[as_header] => 1
[debug] =>
[prevent_request] =>
[multipart] => 1
)

[method] => POST
[url] => http://api.twitpic.com/2/upload.json
[signing_params] => oauth_consumer_key=****[removed]****&oauth_nonce=dbccb6ca52b9ae2549b19a67a4cd373e&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1328045719&oauth_token=****[removed]****&oauth_version=1.0
[auth_params] => Array
(
[oauth_version] => 1.0
[oauth_nonce] => dbccb6ca52b9ae2549b19a67a4cd373e
[oauth_timestamp] => 1328045719
[oauth_consumer_key] => ****[removed]****
[oauth_signature_method] => HMAC-SHA1
[oauth_token] => ****[removed]****
)

[request_params] => Array
(
[key] =>
[media] => @welcome.png;type=image/png;filename=welcome.png
[message] => trying something out
)

[base_string] => GET&https%3A%2F%2Fapi.twitter.com%2F1%2Faccount%2Fverify_credentials.json&oauth_consumer_key%3D****[removed]****%26oauth_nonce%3D9a25880c57a48c96eafb9a464adefd6e%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1328045719%26oauth_token%3D****[removed]****%26oauth_version%3D1.0
[signing_key] => ****[removed]****
[auth_header] => OAuth oauth_consumer_key="****[removed]****", oauth_nonce="9a25880c57a48c96eafb9a464adefd6e", oauth_signature="CvjlwkQqosyWIYYwx61FxK3X7Jg%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1328045719", oauth_token="****[removed]****", oauth_version="1.0"
[response] => Array
(
[headers] => Array
(
[server] => nginx
[date] => Tue, 31 Jan 2012 21:35:19 GMT
[content_type] => application/json
[transfer_encoding] => chunked
[connection] => keep-alive
[x_powered_by] => PHP/5.3.5-1ubuntu7.2
)

[code] => 401
[response] => {"errors":[{"code":401,"message":"Could not authenticate you (invalid application key)."}]}
[info] => Array
(
[url] => http://api.twitpic.com/2/upload.json
[content_type] => application/json
[http_code] => 401
[header_size] => 201
[request_size] => 699
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.203001
[namelookup_time] => 0.002518
[connect_time] => 0.038636
[pretransfer_time] => 0.038655
[size_upload] => 21604
[size_download] => 91
[speed_download] => 448
[speed_upload] => 106423
[download_content_length] => -1
[upload_content_length] => 21604
[starttransfer_time] => 0.038922
[redirect_time] => 0
[request_header] => POST /2/upload.json HTTP/1.1
User-Agent: tmhOAuth 0.61+SSL - //github.com/themattharris/tmhOAuth
Host: api.twitpic.com
Accept: */*
Accept-Encoding: deflate, gzip
X-Auth-Service-Provider: https://api.twitter.com/1/account/verify_credentials.json
X-Verify-Credentials-Authorization: OAuth oauth_consumer_key="****[removed]****", oauth_nonce="9a25880c57a48c96eafb9a464adefd6e", oauth_signature="CvjlwkQqosyWIYYwx61FxK3X7Jg%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1328045719", oauth_token="****[removed]****", oauth_version="1.0"
Content-Length: 21604
Content-Type: multipart/form-data; boundary=----------------------------aac5284784ae

)

[error] =>
[errno] => 0
)

)