You are here

public function SocialFacebookFormatter::getData in Open Social 7

File

includes/social_comments.facebook.inc, line 22
Facebook class

Class

SocialFacebookFormatter
@file Facebook class

Code

public function getData($url, $count) {
  $this->max_items = $count;
  $this->access_token = $this
    ->getAccessToken();
  $post_id = $this->access_token ? $this
    ->getPostId($url) : FALSE;
  $comments = $post_id ? $this
    ->getComments($post_id) : FALSE;
  $output = $comments ? $this
    ->renderComments($comments) : array();
  return $output;
}