0

I use "twitteroauth" and this code fragment:

$userlist='111111,66666,7777,22222';
$Results=$oauth->get( 'users/lookup', array('user_id' => $userlist ) );

After i print out the results, i see that the order of "$Results" is not ok.

For example:
$Results[0] gathers the data of '7777',
$Results[1] gathers the data of '111111'.

I tried this for ten times. Every time the order in array changes.
Is it normal behaviour of twitter API ?
Thank you

trante
  • 33,518
  • 47
  • 192
  • 272

1 Answers1

2

Yes this is to be expected. Array order from Twitter is not guaranteed. You will have to use the user_id of each object.

abraham
  • 46,583
  • 10
  • 100
  • 152