Thank you for taking the time to assist with this. Your help is greatly appreciated.
require_once(‘twitteroauth/src/TwitterOAuth.php’);
if (!defined(‘CONSUMER_KEY’))
{
define(‘CONSUMER_KEY’, ‘****’);
}
if (!defined(‘CONSUMER_SECRET’))
{
define(‘CONSUMER_SECRET’, ‘****’);
}
if (!defined(‘OAUTH_TOKEN’))
{
define(‘OAUTH_TOKEN’, ‘-’);
}
if (!defined(‘OAUTH_SECRET’))
{
define(‘OAUTH_SECRET’, ‘****’);
}
$connection = new Abraham\TwitterOAuth\TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET);
$content = $connection->get(‘account/verify_credentials’);
var_dump($content);
$post = “upload test”;
$status = $connection->post(‘statuses/update’, array(‘status’ => $post));
echo json_encode($status);
Adding print statements to parts of the OAuth library is how I figured out that the OAuth response is error 215 - Bad Authentication Data.
The content and status objects are both NULL after the code is executed.