how to unlike a status using tmhOAuth library
I wrote this
<?php
require_once('tmhOAuth.php');
//require_once('tmhOAuth/tmhUtilities.php');
$q = $_POST['id'];
$tmhOAuth = new tmhOAuth(array(
'consumer_key' => ' ',
'consumer_secret' => '',
'user_token' => '',
'user_secret' => '',
));
$code = $tmhOAuth->request('POST', $tmhOAuth->url('1.1/favorites/destroy'), array(
'id' => $q,
));
echo "code=$code<br/>";
if ($code == 200) {
echo "response OK<br/>";
var_dump(json_decode($tmhOAuth->response['response']));
echo "<br/>";
} else {
echo "response KO<br/>";
echo $tmhOAuth->response['response'];
echo "<br/>";
}
?>