No Share Count or Share Count Not Accurate

MashShare is caching (temporarily storing) the share count and bitly short urls of a post. With using the default caching method "Async Cache Refresh" the shares and Bitly short urls are updated on the following time period:

  • New posts: Updated once every hour
  • Posts older than 3 weeks: Updated once every 4 hours
  • Posts older than 2 months: Updated once every 12 hours

If you like to manually reset the cached shares and short urls you can follow the steps below:

  1. Navigate to the post editor of that particular post.
  2. Press the post update button
  3. Next time the post is loaded, it will update share counts.

Step 1. Check Facebook Rate Limit

Facebook limits the api requests to a maximum of 200 calls per hour so check first if Facebook did not block your site from requesting any share counts.

  1. Install latest MashShare version
  2. Enable debug mode and save settings:

  3. If you get an error notice like " rate limit exceeded" do the following:

    Deactivate share count from Settings->General: Deactivate also the MashShare debug notice

  4. Create a facebook access token and paste it under  settings->networks:Read: How to create a facebook access token

  5. After doing check the MashShare debug notice again. To do so enable again the debug mode and check if the rate limit related error message is gone. If its gone you can switch on again the MashShare share count from General->Settings. If the error is not disappearing you have to wait longer. In very rare cases it can take up to 24 hours until your site has been removed from the Facebook rate limit error.

Step 3. Purge CDN / Caching

If you haven't already please follow the steps under the link  TRY THIS FIRST Before Troubleshooting

Step 4. Verify share count

Check if there are any shares for your post. You can use the link below for checking. These url contains the same method MashShare is using for aggregating the share count for facebook:

Facebook Share Count

Twitter Share Count

Step 5. Refresh your MashShare Cache

Go to your browser and add the following to the end of your URL: ?mashsb-refresh

So your URL look like this: http://yoursite.com/post-name/?mashsb-refresh

This forces MashShare to fetch and update the latest share numbers instead of the previous cached versions.

Step 6. Check if share count has been refreshed

Now go to your post editor and check if the share counts have been updated. You find the share count data of a single post in the custom field: mashsb_shares

Custom Fields

If the Custom Fields are not visible make them visible from Screen Options button from the upper right corner:

screen_options

If the updated shares are visible there you just have to make sure that the post is updated on the frontpage as well.

So if you have running any site caching plugin like W3 Total or WP Super Cache purge the cache manually or specify an automatic expiration time which ensures that your site cache is purged after a specified timeframe and the updated share are shown on the frontend

In W3 Total the expiration time is called header expiration time. WP Rocket calls this Clear Cache Lifespan. Other caching plugins will likely use similiar names.

Step 7. Is a security setting blocking cache rebuild?

The default caching method Async Cache Refresh uses a small code snippet in your site which tells MashShare to fetch new share counts only after completed page loads. This ensures that your site visitors will never see any slower page load while the share count is aggregated.

This is done by a URL parameter added to end of the current post url and is looking like this:

http://yoursite.com/post/?mashsb-refresh

Some security plugins like WordFence block and remove such additional URL parameters. You can test this with adding manually the ?mashsb-refresh parameter to any URL of your site. If the parameter is working fine it remains in the URL of your site. If it gets removed one of the security settings is blocking this parameter.

Fixing this is very simple:

Just navigate to MashShare->Settings->General and switch the Caching Method to Refresh while Loading:

refresh_while_loading

Step 8. When Everything Fails

When you add a Facebook Access Token, in very rare cases your share count still doesn't get updated. However it might work without access token. You can try this situation with the following way;

https://graph.facebook.com/v2.7/?id=YOUR_URL_HERE&access_token=YOUR_ACCESS_TOKEN_HERE

What you need to do is the visit the URL above. Before visiting replace 2 things;

YOUR_URL_HERE: replace it with your post / page URL. For example https://mashshare.net/mashshare-proven-fast-benchmark/

YOUR_ACCESS_TOKEN: replace it with your Facebook Access Token. See How to Create a Facebook Access Token article for more information.

Make sure there are no spaces when you replace these 2 information if there are spaces, you might not get expected results.

After visiting the Facebook API URL with access token, if you don't see any share count information you can visit API URL without Access Token;

http://graph.facebook.com/?id=YOUR_URL_HERE

Just like the previous URL, replace YOUR_URL_HERE with your post / page URL.

Once done, if you see share count in URL without access token but you don't see it in URL with access token this means you need to remove Access Token from Mashshare's settings.

Once removed Mashshare will start using the URL without access token which you have already tested that returns share count.

Still need help? Contact Us Contact Us