Facebook counts were not working for me. I made some changes to the file “/models/button.php”, including making the count the “total_count”.
Here is the new “function get_count_facebook” starting on line 457:
function get_count_facebook( $vars ) {
$url = $vars[0];
$count = 0;
$cache_key = $this->namespace . ‘-facebook-fql-‘ . md5( $url );
$response = get_transient( $cache_key );
if( !$response ) {
$fql = “https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,%20commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=’$url'”;
$response = file_get_contents($fql);
if( !is_wp_error( $response ) ) {
set_transient( $cache_key, $response, FLARE_STATS_CACHE_LENGTH );
}
}
if( !is_wp_error( $response ) ) {
$response_json = json_decode($response);
if( isset( $response_json->data[0]->total_count ) ) {
$count = $response_json->data[0]->total_count;
}
}
return $count;
}