I used this code successfully.
You need the files twitteroauth.php and OAuth.php -- they should be in the same directory -- adjust the path to twitteroauth.php -- change BobRay to your user's screen name.
<?php
define('CONSUMER_KEY', '');
define('CONSUMER_SECRET', '');
define('OAUTH_TOKEN', '');
define('OAUTH_SECRET', '');
require_once('twitteroauth.php');
$tweet = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_SECRET);
/* This will send a tweet, but you need to set the tokens above */
//$text = 'Tweeted from PHP - just testing some code';
//$response = $tweet->post('statuses/update', array('status' => $text));
$response = $tweet->get('statuses/user_timeline', array('screen_name' => 'BobRay'));
if (!$response) {
echo "<_h3>Unknown error using the Twitter API</h3_>";
} elseif (isset($response->error) && $response->error) {
echo "<_h3>Twitter said, there was an error</h3_>";
echo "<_code>$response->error</code_>";
echo "<_p>Full response:</p_>";
echo "<_pre>" . var_dump($response) . "</pre_>";
} else {
//echo "<_pre>" . var_dump($response) . "</pre_>";
foreach ($response as $x) {
echo ($x->text). "\n";
}
}
Your code might work if you added the screen name to the URL:
&screen_name=ActualScreenName
There's documentation here:
https://dev.twitter.com/docs/api/1/get/statuses/user_timeline
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html