I’ve gone back in from scratch, to figure this all out.
If I use index.php’s example, I can post to my profile with no problem. Using the EXACT SAME SCRIPT in my old script, it fails. WHY?
This is it, right here:
session_start();
require_once(‘twitteroauth-master/twitteroauth/twitteroauth.php’);
require_once(‘twitteroauth-master/config.php’);
/* If access tokens are not available redirect to connect page. /
if (empty($_SESSION[‘access_token’]) || empty($_SESSION[‘access_token’][‘oauth_token’]) || empty($_SESSION[‘access_token’][‘oauth_token_secret’])) {
header(‘Location: twitteroauth-master/clearsessions.php’);
}
/ Get user access tokens out of the session. */
$access_token = $_SESSION[‘access_token’];
/* Create a TwitterOauth object with consumer/user tokens. */
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token[‘oauth_token’], $access_token[‘oauth_token_secret’]);
/* If method is set change API call made. Test is called by default. */
$content = $connection->get(‘account/verify_credentials’);
$connection->post(‘statuses/update’, array(‘status’ => $tmessage));
There is no reason on God’s Green Earth this should be failing now…it works in one script but not the other, same server, same me…