how to get all group images in facebook using FACEBOOK API

Posted by From.ME.to.YOU on Stack Overflow See other posts from Stack Overflow or by From.ME.to.YOU
Published on 2010-04-10T01:54:02Z Indexed on 2010/04/10 2:03 UTC
Read the original article Hit count: 780

Filed under:
|
|
|

Hello i'm trying to get all the images from a facebook group using facebook API

i have a problem i can't get all the photos using

$facebook->api_client->call_method('Photos.get', array('subj_id' => $uid));

http://wiki.developers.facebook.com/index.php/Photos.get

what i'm using now is the method

$albums = $facebook->api_client->photos_getAlbums($uid, NULL);

http://wiki.developers.facebook.com/index.php/Photos.getAlbums

and then loop for ever album on

$facebook->api_client->call_method('Photos.get', array('subj_id' => $uid));

then i add every new array results to my big array

$big_array = array_merge($big_array,$result_array_from_that_call);

2 problems occurs here :

1- sometimes this calls fails - i think because of too many calls per second -

2- the request takes a v.long time to process

is there a better way to do that?

Thanks guys

Cheers

EDIT :: i tried to get all the images using

$facebook->api_client->call_method('Photos.get', array('subj_id' => $uid));

and using $uid as the group ID but that's doesn't work " don't know why maybe because all the images is listed in groups "

© Stack Overflow or respective owner

Related posts about php

Related posts about facebook-api