I am using TwitterAPIExchange to publish tweets to Twitter. Over the last 4 months I had no problems until I switched from HTTP to HTTPS.
I did not think this would be a problem as I do not even see this as a setting within the Developers APP and I am doing all this through crontab.
I am using the identical code below on two different servers and the one with SSL I get a successful connection (no errors) but no posting of the tweet -- meanwhile on the server without SSL I get a successful connection and a successful post.
Can a IP get blocked and if so, how do I check it if is, or is SSL a problem -- what do I need to do to fix this?
require_once('TwitterAPIExchange.php');
$connection = array('oauth_access_token' => 'xxx', 'oauth_access_token_secret' => 'xxx', 'consumer_key' => 'xxx', 'consumer_secret' => 'xxx');
try {
$twitter = new TwitterAPIExchange($connection);
echo 'Connection success <br /> ';
$response = $twitter->buildOauth('https://api.twitter.com/1.1/statuses/update.json', 'POST')->setPostfields(array('status' => 'Test Tweet'))->performRequest();
$json = json_decode($response, true);
if (!empty($json['id_str'])) echo 'Post success: '.$json['id_str'];
}
catch (Exception $ex) {
echo $ex->getMessage();
}