Skip to content

Commit

Permalink
fix like functionality due to recent updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jondavidjohn committed May 31, 2013
1 parent e737516 commit 407f758
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/social/service/facebook.php
Expand Up @@ -318,11 +318,13 @@ private function search_for_likes(&$account, $id, $parent_id, &$post, &$like_cou
continue;
}
$post->aggregated_ids[$this->_key][] = $result->id;
$post->results[$this->_key][$result->id] = (object) array_merge(array(
$result = (object) array_merge(array(
'like' => true,
'status_id' => $id,
'from_id' => $result->id,
'raw' => $result,
), (array) $result);
$result->id = $id;
$post->results[$this->_key][$result->id] = $result;
++$like_count;
}
}
Expand Down Expand Up @@ -416,7 +418,7 @@ public function save_aggregated_comments(&$post) {
));
}

$user_id = (isset($result->like) ? $result->id : $result->from->id);
$user_id = (isset($result->like) ? $result->from_id : $result->from->id);
$commentdata = array_merge($commentdata, array(
'comment_post_ID' => $post->ID,
'comment_author_email' => $this->_key.'.'.$user_id.'@example.com',
Expand Down

0 comments on commit 407f758

Please sign in to comment.