Publish to Twitter with PHP [closed]

1

I made this code to publish the news of my site direct to my Twitter, but it is not working and I can not identify the error, since it does not return anything. It does not work and not from error, simply nothing happens. I searched in several places, but could not find a solution.

$resultado = 'Publicar no Twitter';

require_once 'twitteroauth.php';

define("CONSUMER_KEY","XXXXXXXXXXXXXXXXXXXXXXXXXX");
define("CONSUMER_SECRET","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
define("OAUTH_TOKEN","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
define("OAUTH_SECRET","XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET);
$content = $connection->get('account/verify_credentials');
$connection->post('statuses/update', array('status' => $resultado));
    
asked by anonymous 02.02.2016 / 12:26

0 answers