Possible Duplicate:
Invite friends to event facebook api
How do i get all my friends that not are in my event? (not are invited)
right now i just have this, but it just show all friends.
$friends = $facebook->api('/me/friends');
foreach ($friends as $key=>$value) {
foreach ($value as $fkey=>$fvalue) {
if ( is_numeric ( $fvalue['id'] ) ) :
echo '<div class="friends"><table><tr><td><input type="checkbox" name="friends[]" value="' . $fvalue['id'] . '" checked="checked"/></td><td><img src="http://graph.facebook.com/' . $fvalue['id'] . '/picture" title="' . $fvalue['name'] . '"/></td><td><span style="color:#000"> '.$fvalue['name'].'</span></td></tr></table></div>';
endif;
}
}
YOu can check if someone is invited with a http get (see: https://developers.facebook.com/docs/reference/api/event/ ) So first you get all the friends, then check if they are attending, if yes then don't show them, or show them in a grey color like facebook does, otherwise show them
This is btw the answer which facebook gives: https://developers.facebook.com/tools/explorer/?method=GET&path=331218348435/invited/2503747