asimkumar2222 / opensocial-php-client

Automatically exported from code.google.com/p/opensocial-php-client
Apache License 2.0
0 stars 0 forks source link

unable to get more than 89 friends when I have over 6,000 - trying to get 10 friends only returns 8 etc #71

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use the friends page url string
2. set to view all friends
3.

What is the expected output? What do you see instead?
supposed to display detials for all my 6,000 friends but gets stuck on only 89.

[startIndex] => 1
[totalResults] => 5569
[itemsPerPage] => 89
[filtered] =>
[sorted] =>
[updatedSince] => 

What version of the product are you using? On what operating system?
opensocial-php-client-1.1.1 on windows XP pro.

Please provide any additional information below.

I am not sure if "startIndex" is working as it only works if set to "1", I
get error 400 if I set it to anything else.

Also, "count" does not seem right either. If I set to "10" I get 7 friends
back , and if I set to "100" I get 89 friends back. Setting to "1000" I get
89 again, setting to "50" I get 43 friends back.

I also do not think the "fields" option actually does anything. in the test
scripts those options are not the fields which are returned.. for example..

$profile_fields = array(
        'aboutMe',
        'displayName',
        'bodyType',
        'currentLocation',
        'drinker',
        'happiestWhen',
        'lookingFor'
    );

$friends_request_params = array(
      'userId' => '@me',              // Person whose friends we are fetching.
      'groupId' => '@friends',          // @friends for the Friends group.
       'fields' => $profile_fields,      // Which profile fields to request.
      'count' => '50',          // Max friends to fetch.
       'startIndex' => '1'
  );
  $batch->add($osapi->people->get($friends_r
equest_params), 'friends');

actually returns..

[displayName] => NASCAR Fever
[hasApp] => false
[id] => myspace.com.person.4732445
[name] => NASCAR Fever
[profileUrl] => http://www.myspace.com/scoobyluver17
[thumbnailUrl] => http://c1.ac-images.myspacecdn.com/images02/48/s_a
39e7c94666a41ba9d66360bf51363a4.jpg
[isOwner] =>
[isViewer] =>

I tried setting fields to just "id" but it does not change anything. In
fact leaving it out or altering it in any way does nothing.
I can only find this page for instructions.
http://code.google.com/p/opensocial-php-client/wik
i/HowToPeople#Fetching
This shows data returned different again, but does not really explain the
call which was made to generate that data.
Am I doing something wrong somewhere or have these functions not fully been
implimented yet?

Original issue reported on code.google.com by supp...@mymobroom.com on 8 Jan 2010 at 12:36

GoogleCodeExporter commented 9 years ago
Has anyone figured out why passing in a 'startIndex' not equal to 1 causes a 
400 error.  I'm trying to retrieve all friends of a person, but am only able to 
get 100.

Thanks,
Shaun

Original comment by shaunrparker@gmail.com on 10 Aug 2010 at 8:23