我从时间线中删除了推文,但它也显示了以“RT @”开头的转推的推文 我如何使用“转推”字段来检查推文。如果它被转发,我将不会打印它。 我怎样才能在你看到的代码中使用它:
$url = "https://api.twitter.com/1.1/statuses/home_timeline.json";
$requestMethod = "GET";
if (isset($_GET['user'])){
$user = $_GET['user'];
} else {
$user = "Parsi_Tweet";
}
if (isset($_GET['count'])) {
$count = $_GET['count'];
} else {
$retweeted_status = "";
}
$getfield = "?screen_name=$user&count=$count";
$twitter = new TwitterAPIExchange($settings);
$string = json_decode($twitter->setGetfield($getfield)
->buildOauth($url, $requestMethod)
->performRequest(),$assoc = TRUE
);
echo "TIME : ".$items['created_at']."<br />";
echo "TWEET : ". $items['text']."<br />";
echo "BY : ". $items['user']['name']."<br />";