diff --git a/app/modules/social/lib/FacebookDataRetriever.php b/app/modules/social/lib/FacebookDataRetriever.php index 86e4cae68..01de4e6f6 100644 --- a/app/modules/social/lib/FacebookDataRetriever.php +++ b/app/modules/social/lib/FacebookDataRetriever.php @@ -132,8 +132,15 @@ private function parsePost($entry) { $post->setBody($entry['message']); } - if (isset($entry['likes'])) { - $post->setLikeCount($entry['likes']['count']); + if (isset($entry['likes'])) { + if(empty($entry['likes']['count'])) { + $amount_likes = count($entry['likes']['data']); + } + else { + $amount_likes = $entry['likes']['count']; + } + + $post->setLikeCount($amount_likes); } switch ($entry['type'])