Twitter posting using php not working


#1

Hi,

I had used following code for posting tweet using PHP but after some time it’s not working at all without any error. it’s seems like may be my IP is blocked.
please look on that and help me to short out this problem.

<?php
// Insert your keys/tokens
$consumerKey = '***************************';
$consumerSecret = '**********************************************************';
$oAuthToken = '871539744-**************************************************';
$oAuthSecret = '***************************************************************';

// Full path to twitteroauth.php (change oauth to your own path)
require_once('twitteroauth.php');

// create new instance
$tweet = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret);

// Your Message
$message = "twitter posting using php code is not working :(";

// Send tweet 
$tweet->post('statuses/update', array('status' => "$message"));
?>

#2

I would verify that you’re using versioned endpoints. This library lets you easily make requests without an API version and it’s possible that’s your issue.

See:
[faq:11716]