Why this post?
A few months ago, Facebook stopped allowing updating the sharing cache for a URL programmatically, which caused this particular functionality of our “Facebook Open Graph, Google+ and Twitter Card Tags” plugin to stop working.
If you’re not using our plugin, you should just get it, otherwise the information on this post is not for you. Have a nice day 🙂
Each time you update a post on your WordPress website, our plugin makes a call to a specific Graph API URL telling Facebook that the post was updated and that they should scrap it again, in order to get the updated details of that post, thus providing a correct preview when that content is shared on Facebook.
But because Facebook made some changes on their side (go figure…), you are probably getting an error each time you update a post on your website.
(You can still click on the “Manually update Facebook cache” and be done with it)
We found a solution
Basically, Facebook no longer allows updating the cache anonymously, so you have to use an App ID and Secret to do it.
On version 18.104.22.168 we’ve created a filter (fb_og_update_cache_url) that allow advanced users to authenticate the call with an App ID and App Secret of their own, thus bringing this functionality back to life.
After some weeks of testing, we can confirm that this method works, and we decided to add settings to our plugin, on version 2.1.6, that allows setting your own App ID and Secret to authenticate the calls, instead of having to use the filter.
If you are currently using the filter, these settings will NOT be used. You should stop using the filter and use the settings instead.
We decided to write this blog post explaining how to create your own Facebook App, and how to use the app details in our plugin.
Please be advised that no further support will be provided on this. All you need to know is in this blog post.
If you are not comfortable following the steps, please do not do it, and just manually update the cache of your URLs on the Facebook Sharing Debugger.
Step 1: Create your own Facebook App
If you already have a Facebook App, you can skip this step. Any App will do. You don’t have to create a specific app for this. Just skip this step and use your existing App ID and Secret on step 2.
Go to https://developers.facebook.com/apps/ click on “+ Add a New App”, fill a name of your choice and your email, click on “Create App ID”.
If you manage multiple WordPress websites, you do NOT need to create a new App for each website. Just use the same App ID and Secret on all of them.
Step 2: Get the App details
Go to your App Dashboard and copy both the App ID and the App Secret. You’ll have to click on “Show” to get the App Secret.
Step 3: Configure the plugin
Go to our plugin settings page on “Settings” -> “Facebook Open Graph, Google+ and Twitter Card Tags” -> “Open Graph” tab -> “Facebook Open Graph Tags cache” panel, activate the “Clear cache” option and fill in your App details.
And that’s it. Your website should now be able to clear the Facebook sharing cache each time you update a post.
It’s possible that you still get an error when you create a new post, because the plugin will be trying to flush the cache on something that has never been shared to Facebook, but if you update it again, it will work just fine.
Step 4: Drink a beer…
… or any other drink of your choice.
If you want us to join you on that beer, go to the plugin settings page and click on that nice PayPal “Donate” button on the bottom right of the screen.
Also, do not forget to give us a 5 stars rating on WordPress.org 🙂
Hi, I tried to get it as you suggested but it seems don’t work fine. I see always the same debug errors on facebook for developers (missing og:description, fb:app_id) even if I added App Id and secret and scraped the post.
Do you have any suggestions?
Thanks a lot
Hi there Luca,
This is not a support forum and the errors you mention (missing og:description …) are not related to this post subject.
Please use the support forum at wordpress.org
Ok, thanks I’m going to do it!
I cannot find the filter settings to deactivate the fb_og_update_cache_url?
Hi there Tom,
Please use the support forum at wordpress.org
This post needs to be updated because when I click on the link to get the App ID and Secret there’s a lot more to it. I finally figured out how to get to the screen shot and have an App ID but cannot find anywhere to get the Secret so I guess I’ll just spend countless more time trying to figure out how to get this to work.
I was able to find the App ID and Secret by doing most of what was said above and by using the Youtube video here, https://www.youtube.com/watch?v=kQ4s-8Cb5-o
This is incomplete or facebook changed. Step 2, none of this shows anywhere on my screen. You’ve either not give complete steps to locate or it has changed.
I made the same experince like DeeDee Weber. Facebook seems to change the system …
Hello. I have read the gude and all works fine. I have only a problem…when the post is changed and upadated I lost all previous likes and shares…there i s a way to set this?
Thanks and regards,
That is very weird and not supposed to happen at all.
Maybe you’re changing the URL?
if i take a link from the article and shorten it with bit.ly then sharing this link on whatsapp will work?
You’ll have to try it
Thank you! Facebook is working fine, but i get still no image on twitter … Do i have to make any settings?
You need to have the Twitter Card options activated.
Hello, how can I make my facebook image look like on Higher Perspective ( it looks like vertical image, but stil it’s clickable non paid link)
They edited the Facebook post after and changed the image. It’s not possible to do it automatically.
is it possible to use same app id and app secret on multiple wordpress websites?