User timeline returning inconsistent or incomplete list of tweets


#1

I’ve create an app and php page that successfully pulls the last 20 tweets from a given username.
eg. http://utils.infinitemonkeys.mobi/twitter/get_tweets.php?username=cbc

However, for a particular user account, I’m getting inconsistent and/or incomplete results.
http://utils.infinitemonkeys.mobi/twitter/get_tweets.php?username=RoyalsBlue_com
you can see the results don’t match the user’s timeline: https://twitter.com/RoyalsBlue_com

The results seem to be returning the 20 OLDEST tweets, not the 20 most recent… or some other criteria I’m not sure what :slight_smile:

I’m using code straight off MattHarris’ site, and it has been working reliably for months.

$code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline.json'), array(
  'include_entities' => '0',
  'include_rts'      => '1',
  'screen_name'      => $username,
  'count'            => 20,
));

if ($code == 200) {
  header('Content-Type: application/json; charset=utf-8');
  $data = $tmhOAuth->response['response'];
  if(isset($_GET['callback'])){
  	$data = $_GET['callback'] . "(" . $data . ")"; //prepend the callback to make it 'jsonp' format
  }
  echo $data;
} else {
  tmhUtilities::pr(htmlentities($tmhOAuth->response['response']));
}

Anyone have any ideas?
Thanks!
David


#2

Having the same problem!

I already posted to this forum, but no result so far:(

https://dev.twitter.com/discussions/26451