php - Excluding retweets from search query -
php - Excluding retweets from search query -
i trying build simple twitter reader specific hashtags , tweets containing images.
i want exclude retweets , have been trying various ways it. can of course of study take out retweets post having queried them count against number of tweets can get.
i reading trick add together -rt search query haven't been able work.
<?php $url = 'https://api.twitter.com/1.1/search/tweets.json'; $requestmethod = 'get'; $getfield = '?q=#reviews&filter=images'; $twitter = new twitterapiexchange($settings); $string = json_decode($twitter->setgetfield($getfield) ->buildoauth($url, $requestmethod) ->performrequest(), true); foreach($string['statuses'] $item) { echo '<p>time , date of tweet: '.$item['created_at'].'</p>'; echo '<p class="tweet">'. $item['text'].'</p>'; echo '<img class="author" src="'. $item['user']['profile_image_url_https'] .'"><br />'; echo '<p class="author-txt">tweeted by: '. $item['user']['name'].'</p>'; foreach ($item['entities']['media'] $media) { echo '<img src="'. $media['media_url'] .'">'; echo '<div class="clr"></div>'; } } ?>
more search query trying add together ' -rt'
$url = 'https://api.twitter.com/1.1/search/tweets.json'; $requestmethod = 'get'; $getfield = '?q=#bookreviews&filter=images';
i tried adding end this
$getfield = '?q=#reviews&filter=images -rt';
but still no luck.
the result page here
http://000fff.org/readersanomynous/
php twitter
Comments
Post a Comment