FacebookRestClient::events_getMembers PHP Method

events_getMembers() public method

Returns membership list data associated with an event
public events_getMembers ( integer $eid ) : assoc
$eid integer : event id
return assoc array of four membership lists, with keys 'attending', 'unsure', 'declined', and 'not_replied'
    public function events_getMembers($eid)
    {
        return $this->call_method('facebook.events.getMembers', array('eid' => $eid));
    }

Usage Example

        $friend_info = $client->friends_areFriends($friends_array[0], $friends_array[1]);
    }
    // Get all of this user's photo albums.
    $albums = $client->photos_getAlbums($uid, null);
    if (!empty($albums)) {
        $album = $albums[0];
        // Get all photos from this album.
        $album_photos = $client->photos_get(null, $album['aid'], null);
    }
    // Get the profiles of users' five friends.
    $friend_profiles = $client->users_getInfo($friends_array, $profile_field_array);
    // Get events for the next few weeks.
    $events = $client->events_get($uid, null, time(), time() + 86400 * 21, null);
    if (isset($events[0])) {
        $first_event_eid = $events[0]['eid'];
        $event_members = $client->events_getMembers($events[0]['eid']);
        $event_count = count($event_members['attending']);
    }
    // Get all photos of the user, trim to 10.
    $photos = array_slice($client->photos_get($uid, null, null), 0, 10);
    // Get all notifications for the current user.
    $notifications = $client->notifications_get();
    // Get the user's groups, and save a few
    $groups = array_slice($client->groups_get($uid, null), 0, 5);
} catch (FacebookRestClientException $ex) {
    if (!isset($uid) && $ex->getCode() == 100) {
        // This will happen if auth_getSession fails, which generally means you
        // just hit "reload" on the page with an already-used up auth_token
        // parameter.	Bounce back to facebook to get a fresh auth_token.
        header('Location: ' . $config['login_url']);
        exit;