Hi, I have written code for oauth for a dev i'm doing and i'm having
problems actually posting updates to twitter via Oauth. I have tested
code out with verify credentials and other GET methods and it works
fine however it does not work when I use cURL POST methods in PHP. I
get invalid token/signature error. Is anyone getting these types of
problems specifically when posting status updates? Or is this just me?
Also are there some things I should be doing? Here is my method for a
POST call:

function httpPost($url,$headers,$data){
  $query = http_build_query($data);

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, "{$query}");
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $result = curl_exec($ch);
  curl_close($ch);

  return $result;
}


Thanks, I appreciate your help :]

Reply via email to