For a location and keyword search usage, I need to get more results in a given envelope but I can not get more than 100 results in this request.
"<?php
include “library/twitteroauth.php”;
$customer = “vND9n9nCxJGCHCCst9QZB16rs”;
$customersecret = “xxxxxxxxx”;
$accesstoken = "xxxx;
$accesstokens = “xXXXXXXxxxxxxx”;
$twitter = new TwitterOAuth($customer,$customersecret,$accesstoken,$accesstokens);
$keyword = $_POST[‘keyword’];
$geo = $_POST[‘geo’];
$max_id ="";
echo ‘’;
foreach (range(1, 5) as $i) {
$tweets = $twitter->get(‘https://api.twitter.com/1.1/search/tweets.json?q=’.$_POST[‘keyword’].’&lang=tr&geocode=’.$_POST[‘geo’].’&max_id=’.$max_id.’&result_type=recent&count=100’);
}
if(isset($tweets->statuses) && is_array($tweets->statuses)) {
if(count($tweets->statuses)) {
foreach($tweets->statuses as $tweet) {
echo ’
‘.’@’.$tweet->user->screen_name.’’.$tweet->created_at.’’.’’.$tweet->source.’’.$tweet->text.’
’;
$max_id = $tweet->id_str;
}
}
else {
echo 'The result is empty';
}
}
?>"
Thanks.