Second page always empty when using paging


i know it must be something i am doing. I am using twitteroauth and rest1.1 search GET search/tweets

it gets the first page perfect, i set the max_id parameter to the oldest tweet in the list and do a second get, count says max number but statuses is always an empty array.

any ideas what i might be doing wrong? i can’t seem to get past the first page of results no matter how hard i try.


So to clarify

// set my parameters
$this->parameters = array();
$this->parameters['result_type'] = "mixed";
$this->parameters['include_entities'] = 1;
$this->parameters['q'] = "test";

function download() {
  //then i connect and download
  $results = $this->connection->get('search/tweets', $this->parameters);

  //parse results
  foreach($results->statuses as $status) {
    $this->parameters['max_id'] = $status->id-1;
    echo "Post: ".$status->text." from: ".$status->user->screen_name;

  // check if next page exists
  // if ($results->search_metadata->count == 15) { // full count of returned items. Stopped using this cause it always returns the full number.

  if (array_key_exists("results_next", $results->search_metadata)) {

first results works 100% but as soon as i add the max_id i get an empty statuses array.
And if i run the same query and change from 15 to 30 i get 30 responses instead of 15 but the second result is empty.


if it helps this is the json results i get off the second call


I also switched to trying the codebird.php libraries but it is doing the same thing.


So strangly even if i enter max_id in the OAuth tool for my application it comes back empty.
As does the example for the paging.


anyone? i really need to figure out why paging doesn’t work. even if i do it in the API Tools i can’t use max_id for anything.


I’m facing same issue, and wrote it here

Any input is appreciated