Conversation
supportHello Bishoy, I have problems with number of facebook shares, for example i have a post with 91 facebook shares and plugin say 16. Can u do something? Thank you! Alessandro https://wordpress.org/plugins/posts-social-shares-count/
Hello Alessandro, The plugin caches the results for one hour. Maybe it was cached? After you checked again, did the number change?
The number does not change with cleaned cache, i dont know why
The problem after the last release of plugin
I’ll test it and see if I can replicate it.
Were you ever able to replicate this issue? I am having a similar problem.
I know it has something to do with the transient api, because when I test without it the count is correct. Let me know if you were able to find out anything. Thanks!
This is what is getting added as _transient_pssc_counts option_value in the mysql database: a:9:{s:17:"pssc_facebook_127";i:1;s:17:"pssc_facebook_122";i:5;s:17:"pssc_facebook_121";i:6;s:17:"pssc_facebook_117";i:5;s:17:"pssc_facebook_110";i:4;s:17:"pssc_facebook_105";i:11;s:17:"pssc_facebook_103";s:1:"0";s:17:"pssc_facebook_102";i:1;s:17:"pssc_facebook_101";s:1:"0";} and the numbers are not accurate. For example “pssc_facebook_105”;i:11;s:17: should be 65 not 11. I can delete it from the database but it comes back the same. Any ideas?
//Facebook function needs to be updated public function pssc_facebook() { $json_string = file_get_contents(‘ http://graph.facebook.com/?id=’ ; . $this->url); $json = json_decode($json_string, true); return isset($json[‘shares’]) ? intval($json[‘shares’]) : 0; }
Corrected public function pssc_facebook() { $json_string = $this->file_get_contents_curl('http://graph.facebook.com/?id=' . $this->url); $json = json_decode($json_string, true); return isset($json['shares']) ? intval($json['shares']) : 0; } Author please update this issue in the plugin
Hello Alessandro, The plugin caches the results for one hour. Maybe it was cached? After you checked again, did the number change?
The number does not change with cleaned cache, i dont know why
The problem after the last release of plugin
I’ll test it and see if I can replicate it.
Were you ever able to replicate this issue? I am having a similar problem.
I know it has something to do with the transient api, because when I test without it the count is correct. Let me know if you were able to find out anything. Thanks!
This is what is getting added as _transient_pssc_counts option_value in the mysql database: a:9:{s:17:"pssc_facebook_127";i:1;s:17:"pssc_facebook_122";i:5;s:17:"pssc_facebook_121";i:6;s:17:"pssc_facebook_117";i:5;s:17:"pssc_facebook_110";i:4;s:17:"pssc_facebook_105";i:11;s:17:"pssc_facebook_103";s:1:"0";s:17:"pssc_facebook_102";i:1;s:17:"pssc_facebook_101";s:1:"0";} and the numbers are not accurate. For example “pssc_facebook_105”;i:11;s:17: should be 65 not 11. I can delete it from the database but it comes back the same. Any ideas?
//Facebook function needs to be updated public function pssc_facebook() { $json_string = file_get_contents(‘ http://graph.facebook.com/?id=’ ; . $this->url); $json = json_decode($json_string, true); return isset($json[‘shares’]) ? intval($json[‘shares’]) : 0; }
Corrected public function pssc_facebook() { $json_string = $this->file_get_contents_curl('http://graph.facebook.com/?id=' . $this->url); $json = json_decode($json_string, true); return isset($json['shares']) ? intval($json['shares']) : 0; } Author please update this issue in the plugin