For those who would prefer to update their code in-place, the following changes were made to TweetWX-global.php (also applies to Mike’s TweetWX642-global.php script):
Change:
function do_post($url, $postbody, $port=80, $headers=NULL)
{
$retarr = array(); // Return value
$curl_opts = array(CURLOPT_URL => $url,
CURLOPT_PORT => $port,
CURLOPT_POST => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_POSTFIELDS => $postbody,
CURLOPT_RETURNTRANSFER => true);
To:
function do_post($url, $postbody, $port=443, $headers=NULL)
{
$retarr = array(); // Return value
$curl_opts = array(CURLOPT_URL => $url,
CURLOPT_PORT => $port,
CURLOPT_POST => true,
CURLOPT_SSL_VERIFYHOST => true,
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_POSTFIELDS => $postbody,
CURLOPT_RETURNTRANSFER => true);
Change:
$url = 'http://api.twitter.com/1/statuses/update.json';
To:
$url = 'https://api.twitter.com/1.1/statuses/update.json';
Change:
if ($usePost) {
$request_url = $url;
logit("tweet:INFO:request_url:$request_url");
logit("tweet:INFO:post_body:$query_parameter_string");
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$response = do_post($request_url, $query_parameter_string, 80, $headers);
} else {
To:
if ($usePost) {
$request_url = $url;
logit("tweet:INFO:request_url:$request_url");
logit("tweet:INFO:post_body:$query_parameter_string");
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
$response = do_post($request_url, $query_parameter_string, 443, $headers);
} else {
And your feed should work again.
Best regards,
Ken