I had the same problems until I realized that the parameters should be double-encoded for the base line. My GET requests work fine, but my POSTs, especially status updates, have failed. On suspicion, I tried POST without spaces in the status parameter, and it worked.
In PHP:
function encode($input) { return str_replace('+', ' ', str_replace('%7E', '~', rawurlencode($input))); } $query = array(); foreach($parameters as $name => $value) { $query[] = encode($name) . '=' .encode($value); } $base = encode(strtoupper($method)) . '&' .encode($norm_url) . '&' . encode(implode('&', $query));
Notice the encode function around the parameter names and values, and then around the entire query string. Space should end as %2520 , not just %20 .
Jrgns
source share