No Share Count or Share Count Not Accurate
This contains outdated information
MashShare does not support facebook access tokens any longer
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:
- Navigate to the post editor of that particular post.
- Press the post update button
- 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.
- Install latest MashShare version
- Enable debug mode and save settings:
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
Create a facebook access token and paste it under settings->networks:Read: How to create a facebook access token
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:
So your URL look like this:
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
If the Custom Fields are not visible make them visible from Screen Options button from the upper right corner:
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:
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: