I have this code right here, where the $friends
variable is an array with an output like this:
{
\"id\": \"1149862205\",
\"name\": \"name\",
You need to check inside you loop to get the ones that don't like.
$return = '';
$friends = $facebook->api('/me/friends');
if (!empty($friends['data'])) {
$size = variable_get('facebook_graph_pic_size_nodes','square');
$protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
foreach ($friends['data'] as $data) {
$fbid = $data['id'];
$fbfriendlikes[$fbid]=$facebook->api('/'.$fbid.'/likes');
$fbname = $data['name'];
$path = $protocol . '://graph.facebook.com/' . $fbid . '/picture?type=' . $size;
$image = theme('image', array('path' => $path, 'alt' => $fbname));
foreach($fbfriendlikes['data'] as $like) {
$likes = false; // set var to check for like
if($like['id'] == '184759054887922') { // check if they liked it
$likes = true; // set var to true because they liked it
}
if (!$likes) { // test var to see if false (they did not like)
// print this if they did NOT like it, otherwise do nothing
$return .= ''.$image.'';
$link = ''.$fbname.'';
$return .= ''.$link.'';
}
}// go on to next in loop
}
echo $return;
}