Support » Plugin: Social Media Share Buttons | MashShare » Share count stopped working

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Rene Hermenau

    (@renehermi)

    > Hi! As the title suggests, I am getting “0 shares” on many posts that I know for a fact have hundreds of shares. This did work at first, but now it doesn’t.

    I assume you have a lot of traffic. Try to use the asynchronous caching method and see if this works. After activating open the certain page where you notice the zero shares and ONLY purge the cache for this page NOT for the entire site otherwise you will run into hammering the fb rate limit again.

    Also think about to purge the cloudflare cache for this page or it will not work.

    MashShare is running fine with php 7

    Hi Rene! Thank you for the fast response!

    With regards to what you said:
    I already had “Async Cache Refresh” set as the Caching Method, so I’m guessing that’s probably not the cause.

    I also have Caching disabled when logged in as Admin, which is how I was testing it. But I also made sure just in case to clear the individual page cache (including cloudflare) but still it doesn’t seem to be updating.

    Just to note, this stopped working in my last 7 posts. Previous posts before that have the share counter displaying the number. Though I’m assuming that’s probably a number saved from the database the last time a successful call to FB API was made?

    Is it possible I went over the total daily limit of API calls?

    • This reply was modified 2 years, 11 months ago by monsuirette.
    Plugin Author Rene Hermenau

    (@renehermi)

    Try the other caching method instead: refresh while loading.

    Also enable debug mode and check the notice there. It will tell you if your site is rate limited.

    Hmmm… I tried turning on debug, and in both cases it returned all the information for google.com: API test, and API+Key test.

    I also switched to Refresh While Loading… still doesn’t work.

    I then cleared the cache and did a reload of the page… still doesn’t work :\

    I think this may have started happening shortly after I switched to php7… do you think this could be related in any way?

    I know you said there are not compatibility issues with php7, but the reason I am asking is because this is the only thing I can think of that was changed and shortly after the share counters stopped working. Before that they worked just fine.

    • This reply was modified 2 years, 11 months ago by monsuirette.

    Testing facebook public API

    Result for google.com:
    {“og_object”:{“id”:”381702034999″,”description”:”Search the world’s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you’re looking for.”,”title”:”Google”,”type”:”website”,”updated_time”:”2017-02-09T00:44:41+0000″},”share”:{“comment_count”:2,”share_count”:40786703},”id”:”http:\/\/www.google.com”}

    Testing facebook API
    with access token

    Result for google.com:
    {“og_object”:{“id”:”381702034999″,”description”:”Search the world’s information, including webpages, images, videos and more. Google has many special features to help you find exactly what you’re looking for.”,”title”:”Google”,”type”:”website”,”updated_time”:”2017-02-09T00:44:41+0000″},”share”:{“comment_count”:2,”share_count”:40786703},”id”:”http:\/\/www.google.com”}

    • This reply was modified 2 years, 11 months ago by monsuirette.
    Plugin Author Rene Hermenau

    (@renehermi)

    Looks good so far. Please install the query monitor plugin and let me know if there are any php errors on your site.

    Hi Rene,

    I installed the Query Monitor plugin as you suggested, but I did not see any php errors what so ever. I tried both on the website side (with cache disabled to get the dynamic php), and on the admin panel side. No php errors reported.

    I also tried to “Purge DB Cache” in the MashShare debug settings just to see if it might help. Still didn’t fix it.

    Thank you for your patience in helping me by the way!

    • This reply was modified 2 years, 11 months ago by monsuirette.
    Plugin Author Rene Hermenau

    (@renehermi)

    > I also tried to “Purge DB Cache” in the MashShare debug settings just to see if it might help. Still didn’t fix it.

    That was not wise. Now all your shares are zero and needs to be recreated which makes your issue worst.

    I am pretty sure your issue is cache related. We have thousand confirmed installations where mashshare is running fine with php7 so it’s unlikely that php7 is the cause of the problem.

    I recommend to create a staging site, deactivate their all caching including cloudflare and W3 total and than check again if if the error is still happening.

    Than we can track down the issue more.

    I just did it out of frustration because I didn’t know what else to do. It’s not a big deal because we either get it working on my entire site, or not, in which case I don’t really benefit from partial share counters on old posts.

    I tried clearing every possible cache both from my W3 Total Cache, and going to CloudFlare and MaxCDN and clearing all the caches there. I also disabled the MashShare cache in the debug settings for testing purposes.

    So with all caches clear, and MashShare cache disables, I proceeded to test it… it’s just not working!

    Do you want me to create an entire new WP installation website just to troubleshoot this? Isn’t there anything else we can try before?

    Would removing the plugin and reinstalling it help?

    Hey Rene, I fixed the problem:

    – I went ahead and deactivated the plugin, then deleted it. Then I reinstalled it, and that DIDN’T work!

    – I then noticed the option of “Remove Data on Uninstall?”, so I enabled that, and then repeated the above process of deactivating and then deleting the plugin.

    – After that I reinstalled the plugin, configured it exactly as before (manual configuration, not import settings from json), and now it works exactly as before!

    You can see the original test URL from my first post for an example 🙂

    So I don’t know if maybe the switch from php56 to php7 when having an *existing* install of the plugin is maybe what caused the issue. But completely removing it and then reinstalling it works 100% successfully!

    Thank you!

    Plugin Author Rene Hermenau

    (@renehermi)

    I am really happy to hear this and thanks for the feedback. Thats valuable in case someone else experiences the same issue.

    Have a great weekend.

    Thank you Rene! Just another quick question:

    I now have a slightly different problem, for some reason, on specific posts it doesn’t work. Like this post for example:
    http://www.msfanpage.link/trump-takes-action-jeff-sessions-sworn-in-wasting-time/

    No matter how many times I refresh it, I am not getting the share count for it updated. However, at the same time, if I go to a really old post, then refresh, the share counter updates immediately.

    I did this several times now… go to random old posts, they don’t have share count. I refresh, and share count updates instantly (I do this via admin login which is not cached). But when I go back to the above post, no matter how many times I refresh it doesn’t update the share count. I thought at first maybe this post just doesn’t have any shares, but it has 151 shares as confirmed via FB API explorer (I have in settings to display shares above 10).

    Do you have any idea why just on this post it refuses to work, but then it works without problem on any other post?

    UPDATE:
    I see now that on the above post it worked and is now displaying the share count. But for some reason it took a really long time for it to update on THAT specific post, while on many other posts it was instantaneous. Is this because there is an API access time rate limit that is per-post? If so what is the limit in minutes? Because I was trying to refresh it for at least 10-15 minutes without success… so I’m assuming the rate limit is higher than that?

    • This reply was modified 2 years, 11 months ago by monsuirette.
    • This reply was modified 2 years, 11 months ago by monsuirette.
    • This reply was modified 2 years, 11 months ago by monsuirette.

    Ah okay, nevermind… I can see from the debug log that for some posts updates are scheduled few hours ahead I guess to reduce API calls, but for others it’s just few minutes? Is this correct?

    • This reply was modified 2 years, 11 months ago by monsuirette.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Share count stopped working’ is closed to new replies.