I used this: https://github.com/abraham/twitteroauth
I made twitter.php (see code beneath)
It Works
My point is, what I also had with the old scripts.
I want that my tweets with # and @ to be excluded on the site. Those tweets should not be in the list.
I cannot fix it. I think I have removed the RT already, but not the tweets with # and @
Can someone help me?
<?
require_once(“twitteroauth/twitteroauth.php”); //Path to twitteroauth library
$twitteruser = “cooltennis”;
$notweets = 5;
$consumerkey = “";
$consumersecret = "";
$accesstoken = "";
$accesstokensecret = "”;
function getConnectionWithAccessToken($cons_key, $cons_secret, $oauth_token, $oauth_token_secret) {
$connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret);
return $connection;
}
$connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
$data = $connection->get(“https://api.twitter.com/1.1/statuses/user_timeline.json?include_rts=false&screen_name=".$twitteruser."&count=”.$notweets);
foreach ($data as $tweet) {
echo ‘
’;
echo $tweet->text .’
’ . date(“d-m-Y - G:i”,strtotime($tweet->created_at)) . ‘
’;
}
?>