{"id":8560911,"date":"2016-12-16T18:14:48","date_gmt":"2016-12-16T18:14:48","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/fix-facebook-counter\/"},"modified":"2016-12-16T18:18:06","modified_gmt":"2016-12-16T18:18:06","slug":"fix-facebook-counter","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/fix-facebook-counter\/","title":{"rendered":"Fix Facebook Counter"},"content":{"rendered":"<p>The Problem is that facebook change the json,<br \/>\nand you can fix the problem by edit this file<br \/>\n<em>wp-content\/plugins\/posts-social-shares-count\/classes\/share.count.php<\/em><br \/>\nand go to function pssc_facebook<br \/>\nand change the code inside it with this code<\/p>\n<pre><code>$json_string = $this-&gt;file_get_contents_curl( &#039;https:\/\/graph.facebook.com\/?id=&#039;.$this-&gt;url );\n$json = json_decode( $json_string, true );\nreturn isset( $json[&#039;share&#039;][&#039;share_count&#039;] ) ? intval( $json[&#039;share&#039;][&#039;share_count&#039;]) : 0;<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-8560911","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8560911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":4,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8560911\/revisions"}],"predecessor-version":[{"id":8560929,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8560911\/revisions\/8560929"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8560911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}