How to clear Facebook Share’s Cache

Facebook share is good, simple, lets us share almost everything on web in seconds. But Facebook caches already shared urls/pages for better performance. This causes issues at time when we update the title, picture being shared or the description of the page because Facebook still shows the older version of the page.

For modifying which image, title and description FB chooses, read this

I will discuss three simple ways to force facebook to go and fetch the latest stuff from the page being shared.

Method 1 :

Facebook treats each url as unique and caches the page based on that url, so if you want to share the latest url the simplest solution is to add a query string with the url being shared. In simple words just add ?v=1 at the end of the url. Any number can be used in place of 1,

This method is fairly simple but it doesn’t retain the share count for this page, as it treats this page as a different url hence the count for this url will be restarted from 0. Plus if someone else shares the original url without the querystring the information will still be the old one.

Method 2:

Using url shortner services like bit.ly. shorten your url form bit.ly and then use the new url for Facebook share. This too is a simple and quite popular method but has the same issues as the first one.

Method 3:

Facebook has a tool called Debugger (formerly known as URL Linter). This tool gives us an idea about how a url will be shared on Facebook, what content, which image will be fetched. Further details about this tool can be found here.

We can use this tool for any url and it fetches the latest title, description, excerpt and other stuff that will be shown while sharing the link. If you use an already shared URL with this tool then Facebook fetches the latest content, and also updates it cache with the latest content.

With this methos the url remains the same hence the share count will persist and the content will be updated. Someone else sharing the url will also see the latest content now. So this method is of course the best.

The Debugger tool can be accessed here.

Found this post helpful? Want to return the favor? Use the button below :)

  • Samiul

    Thanks :). Its help me.

  • Anonymous

    appreciate !

  • kris

    Hi Umair,

    What would be the reason, that after an update, the linter shows the correct title, description and the image but the share preview still is wrong (like before the update – just the title, but no description and image).

    Thanks,

    Kris

  • Anonymous

    Can you post the URL with this issue here, this would help me debugging.

  • kris

    Hi Umair,

    The url is:
    http://pentomino-challenge.com/PentoGame.html

    Thanks,

    I appreciate it.

    Kris

  • Anonymous

    try sharing this link on FB now.

  • kris

    It works now. Thanks a lot, I really appreciate it, but what did you do?

    Kris

  • Anonymous

    did the same technique which I have explained here.

  • http://www.facebook.com/sajshirazi Syed Asghar Javed Shirazi

    Nice one. I needed this.

  • Anonymous

    I am glad to be of help :)

  • santiagoeche

    Method 3. Love it!! Thanks

  • Allan

    Hello – am having trouble also and I have tried method three. I go to URL Linter and enter my URL but then when i attempt to post to FB, i get the same results. The thumbnails won’t load and since they won;t load I can’t choose the thumbnail i want to highlight. http://www.cantv.org/highlights/index.html

    Any help is greatly appreciated.

  • Anonymous

    Hi,
    Please try the tricks given in http://umairj.com/29/modify-how-the-shared-item-appears-on-facebook/

    This will help FB find your images and text easily, lemme know if this works.

  • JustNice

    hi umairj,

    i’ve been using the linter, too.. But i have this page whose content changes on a daily basis. it’s kinda tedious if we keep on going to the url linter everytime right? any idea how to do this? thanks! :)

  • Anonymous

    Hi,
    As I have explained above that Facebook caches pages and their contents, hence I dont see any simple solution to delete facebook’s cache automatically. You will have to do it manually or else have a general description and image for such a page.
    If you dont know how to customize which picture and text facebook picks from your page then this post will be of help http://umairj.com/29/modify-how-the-shared-item-appears-on-facebook/

  • http://profiles.google.com/swamyveera Swamy Veera

    hi umairj
    I am having the same problem, tried all 3 possible solutions that you mentioned, also, lint tool shows the correct thumbnail where as sharing a link shows old thumbnail. Not sure what else methods to try.

    Are there any other methods?

  • Anonymous

    give me the URL here ?

  • Tihoang2006

    hi,
    I tried with limt and it’s fine. But sometime all submited metadata has been lost and I have to try it again. Any solution for keep the cache, Umairj?
    Many thanks.

  • Anonymous

    If the cache is lost then Facebook will hit your page again and take the latest data. Whats the issue in it ?

  • Tihoang2006

    Dear Umairj,
    I just build a facebook apps that have authorization in

    private const string Required_Permissions = “read_stream,publish_stream”;
    [FacebookAuthorization(IsFbml = false, RequiredPermissions = Required_Permissions)]

    My problem is can’t use limt to make facebook cache my url metadata.

    I try to disable authorization:
    //private const string Required_Permissions = “read_stream,publish_stream”;
    //[FacebookAuthorization(IsFbml = false, RequiredPermissions = Required_Permissions)]

    Then I can use limt to cache my metadata, it work fine!

    After facebook cache my url metadata, I enable authorization and don’t run limt anymore. But my metadata has been lost after 1 or 2 day.

    How can I get facebook cache my url metadata with facebook authorization? Or how can I get facebook cache my metadata without auto update?

    Thank guy,

  • Anonymous

    Sorry, have no Idea about your facebook app

  • Tihoang2006

    ^^! thanks

  • Tihoang2006

    any idea about when and how facebook auto-update my url metadata cache, Umairj? :)
    (I want to avoid updating from fb)

  • Christa Eagleton

    I’ve been frustrated by this all day. Glad to see this posting. I tried FB Linter – entered the URL, have no idea what I’m supposed to do from there. Not all of the information in Linter is correct, yet it’s correct in the meta tags. Help! Here’s my link: http://www.wpmaindish.com/WolfgangPuck_SeasonalNews_2Q11.html

  • Anonymous

    yes the Linter is fetching wrong fields, why dont you try adding the meta information as I have explained here http://umairj.com/29/modify-how-the-shared-item-appears-on-facebook/

  • Christa

    Thanks. Oddly, I had tried those once before and couldn’t get them to work. Must have been something leftover in the code. Will try again!

  • Anonymous

    try using them and I can help you in case of any issues.

  • http://www.thecomplexmedia.com/blog theComplex

    I have been having so many issues with this lately. My links shared just fine then about a month ago, everything changed. I’ve been using the linter for about 3 weeks and it’s worked but now it no longer works either. Im so frustrated.

  • Mgmthias

    Hello,i wrote something stupid on a facebook page,and whenever i google my name,the wallpost is there,how do i get it off? i tried lots of stufff

  • Anonymous

    @db961bab83e8fa3e98ccab7d46568a70:disqus have u deleted the post ?

  • Prashant Sahni

    Very useful Thanks a lot!

  • Lacko

    thanks a lot!
    I was fighting with tomatocart eshop to generate proper meta tags to set right picture for products like button posts on facebook and result from testing were really bad links to picture. This article helps me to get everything in place. Thanks again, great job!

  • Zhoudek

    Umair, can you help me please with this problem. Recently I have integrated three sites of mine with facebook. Two of them stuck together somehow in facebook: perfectfightclub.hu and turbogyar.hu . When I Like anything on the fight site it is OK. When I Like anything on the turbo site it is OK _except_ for the main page. To put this in different words: if I Like the main page of turbo site, it is shown at facebook as I Liked the fight site! I have already tried at lint both of them and they seem to be OK for the meta tags. However if you check the Like-count at the bottom of the lint page — they are the same for both sites! (I removed the like button from the turbo site but I left the opengraph tags so that you can lint pages at this site).

    This seems to be a kind of a cache problem – but lint does not solve it for me.

  • Zhoudek

    The mentioned pages are “separated” now — was it You who helped? ;-)
    Thanks !

  • http://umairj.com/ Umair Jabbar

    Hi, I am glad it works for you know, would have been some delay with the update of cache after lint. :)

  • Zhoudek

    I thought Lint has an instant effect.
    For the record: this was a delay of more than 24hrs… :-)

  • http://umairj.com/ Umair Jabbar

    Lint is instant but you know there may be times when things take a lil longer

  • Mehdi_elyaalaoui

    Dear Omar… Thanks a lot for the info, but it doesnt work for my URL. FB and URL Linter still show the old data (From my old provider), while it should show my new website description…

    Mu URL is http://www.myriamzerrad.com

    Thanks a lot

  • Jesse Smith

    ?v=1 is useless with youtube videos.

  • Jesse Smith

    Though Linter finally fixed it.

  • http://achtung.webhop.net/allenj/?p=1218 如何清除Facebook分享連結的Cache(meta資料) | Allen J

    [...] How to clear Facebook Share’s Cache Breaking Facebook’s Share Cache Modify how the shared item appears on [...]

  • http://UncorneredMarket.com/ Daniel Noll | UncorneredMarket

    Am having the same problem on Google Plus with cached thumbnail associated with the post/page.   Any idea how it works there?   Thanks, Dan

  • http://umairj.com/ Umair Jabbar

    I am not sure if google has such a tool, but I think using a query string should do it. have you tried that ?

  • http://www.facebook.com/markezine João Paulo Marquesini

    Umair, that helped me a lot, thanks!

  • Dominic

    Wow, I spend the last two days looking for this! Thanx so much

  • ston

    Greetings umair Jabbar, I am getting troubles sharing a url, I have used your methods but have not worked yet.
    I am building sharebutton dinamically:
    sb.Append(“”);sb.Append(“”);sb.Append(“”);sb.Append(“”);sb.Append(” “);

    It always show the same image, title and description, could you indicate what I am doing wrong.

    thanks a lot.

    ston

  • http://twitter.com/audinary_music Andy Turner

    I’m getting an old blavatar when I post a link to my WordPress blog on Facebook – latest post http://afolksongaweek.wordpress.com/2011/09/03/week-2-a-shepherd-of-the-downs/

    Whenever I post a link on Facebook it’s showing an old image – one which was online for a few minutes before i noticed it said “A Folk Song A Day” not “A Folk Song a Week”.

    Thanks for helpful advice above, at least I now realise my problem is with Facebook, not with WordPress or my own cache. Have gone to the URL Linter and the thumbnail displayed is the wrong one, but if you click on it you get the full-size correct image. Indeed this bit is OK: “Data SourceExtracted 1
    values from :
    http://1.gravatar.com/blavatar/7a890cf9765b5398136376264776a667?s=300” – that URL is correct. Do I just have to wait for the Facebook cache to catch up, or can I force it in any way?

    cheers

    Andy

  • http://www.facebook.com/profile.php?id=621151171 Masli Yahaya

    Thanks , it really help me alot

  • Darius Spearman

    Great tool! Worked perfect for me. I needed this, but how come there’s no “Like” button. I want to “Like” it because I’m sure others have been searching for this tool as well.

  • Darius Spearman

    Never mind. I was looking for the button at the actually “debugger” page, but this page I’m commenting on has a “like” button. Used it …

  • http://umairj.com/ Umair Jabbar

    I am glad it was helpful for you. I hope others find this fix easily, I have tried google and it appears on the first page which is good enough. People just need to search for the right thing :)

  • Yurenseven

    Dear Umairj ,
    What’s the reason, that there is’t title and image in my wall when I like a page?

    Thanks,
    Tony.ren

  • http://misterbark.com Mister Bark

    OMG thanks so much ! :) I was so tired of their stupid cache that lasts too long! URL linter saved me! :D

  • Cardlab123

    Does the Method#1 really work, I tried adding a query string and it does not make any difference, It still displays the old Image.
    One cannot always use linter as we have a dynamic image to be displayed based on the query string parameter
    My requirement is that the page is always the same but the content and the images on the page change based on the parameter we pass in the URL, and the image we pass in the Og:image meta tag is also dynamic based on this. But facebook always displays the old image associated withthe page. Is there a way we could make a call to the linter url every time we access the page. 

  • Cardlab123

    Does the Method#1 really work, I tried adding a query string and it does not make any difference, It still displays the old Image.One cannot always use linter as we have a dynamic image to be displayed based on the query string parameterMy requirement is that the page is always the same but the content and the images on the page change based on the parameter we pass in the URL, and the image we pass in the Og:image meta tag is also dynamic based on this. But facebook always displays the old image associated withthe page. Is there a way we could make a call to the linter url every time we access the page. 

  • http://umairj.com/ Umair Jabbar

     can you gimme a link to the page ? so that I can do some testing on my own

  • http://www.prosklitiria.org/ Prosklhthria

    The trick work for some time but not any mor. Any ideas ?

  • http://kolorea.fr/celinecarini/pense-bete/facebook-share/ Facebook Share :: Céline CARINI

    [...] Vider le cache http://umairj.com/146/how-to-clear-facebook-shares-cache/ ← précédent : Multi [...]

  • Angela

    Thanks for posting this–saved me a bit of hair-pulling :) Is there a way to clear multiple pages at once, or even clear all cache found one site? Or would you know if/when FB expires the data in their cache and pulls the new one? For many pages (i.e. many photo galleries) it would be difficult to input all pages into the linter to force a clear :)

    Thanks!

  • http://umairj.com/ Umair Jabbar

    Hi @3e1d0eadb4220f5ef48fc009e2976f70:disqus
    There is not such way in my knowledge which would help delete all the cached data for a site, and facebook’s cache refresh time is also not known.

  • Angela

    Alright, thanks! I did run a quick check on analytics, and it seemed the FB bot/UA mentioned on the docs hit my pages once in April and once just this month :p Although this may not be indicative in any way. But thanks for responding!

  • APeterson

    First, thanks for your great write-up. I appreciate the detailed information.

    Second, unfortunately, none of the solutions work for me.

    I’m adding the ‘like’ button using the iframe solution with additional open graph tags (og:title, og:description, og:image). I’m testing how the ‘like’ post looks before I finalize the and lock down the code. The first post looks as expected — the image, title and description match the tags in my code. However, when I make corrections or updates, the changes display fine in the Facebook debugger, but they never appear in the post on my wall (where I’m testing my work). I’ve tried multiple times over several days.
     
    Since these are new ‘like’ buttons, I can’t imagine I’m running into the 50-’like’ limit which locks down some of the og meta tags.
     
    Help. I’m totally stuck. I haven’t found any way to see the updated og tags show up on my wall. Is there something else I’m missing or that will prevent updated og tags from displaying?

  • insider

    you are a genius!

  • http://umairj.com/ Umair Jabbar

    Thanks @bad5eb8a21a428d5834ef79183acbbd9:disqus

  • http://umairj.com/ Umair Jabbar

    Hey Peteson,

    any luck with the issue?

    why dont you mail me or ask me on twitter and I’ll try to do whatever I can

  • http://africanxpressi.allergiesaid.com/2011/12/28/myspace-casche/ Myspace casche | Africanxpressi

    [...] How to clear Facebook Share’s Cache | KaizenNov 5, 2010 … Facebook caches already shared urls/pages for better performance. This causes issues at time when we update the title, picture being shared … [...]

  • Jannette Pazer

    So glad I found this post. The Linter worked for me. I wanted to announce my new blog site, and Facebook kept displaying the old Title and I couldn’t figure out how to get it to update to the new one. Most excellent advice. Thanks again!

  • Kristian Ackar

    Hi,

    I need some method to clear fb cache programmatically.
    I’ve created PHP script which with cURL tool try to periodically clear cache.

    It’s something like this (but that don’t work for me):
                    // because the url for girl of the day is always the same, but the picture of the girl isn’t, fb cashe the picture by the url    // because of that every day through its ‘share’ and ‘like’ API it returns the same picture (old one)    // so it needs to pass the url to the fb tools to clear cashe, and it will be done every time the new girl of the day is stored 

                    $url = “http://developers.facebook.com/tools/debug/og/object?q=http://www.vecernji.hr/djevojka-dana”; $useragent = “Opera/9.80 (X11; Linux x86_64; U; en) Presto/2.10.229 Version/11.60″; if ( $ch = curl_init( $url ) ) { curl_setopt( $ch , CURLOPT_HEADER , 0 ); curl_setopt( $ch , CURLOPT_RETURNTRANSFER , true ); curl_setopt( $ch , CURLOPT_USERAGENT , $useragent ); $str_response = curl_exec( $ch ); if( curl_errno( $ch ) != 0 ) { $message = ‘Girl of the day – cURL exec error: ‘ . $ch; error_log( $message ); } //echo $str_response; curl_close( $ch ); } else { $message = ‘Girl of the day – cURL init with url: ‘ . $url . ‘ failed’; error_log( $message ); }

  • Rolandster

    Did you ever manage to figure it out? I currently have the same problem. Any help would be appreciated.

  • Anonymous

    Awesome! Thanks very much! Cheers from Singapore

  • artwwweb

    Thanks very much, your info about the FB Debugger saved a lot of frustration!

  • Mbahpapa

    Cool… Thank!

  • http://www.facebook.com/profile.php?id=624594408 Scott Buscemi

    It worked for me. I kept trying to use the same link even as I changed my HTML settings, and yet Facebook still kept showing the URL without a description/link. I added the parameter and it no longer kept the share cache.

  • Yerevanreport

    Thank you very much this was a great help!

  • http://inlawoutlaw.com/ Lynda

    Thank you, thank you, thank you!!! My site was continuously coming up as private, even though I had changed it to public. Method # 3 worked perfect :) Thanks again!!

  • http://twitter.com/LoadTimes LoadTimes

    Just what I needed. Thank you for posting. Now on to dealing with all my other Facebook headaches! ;)

  • http://webcoder-blog.com/?p=5384 Some subtleties of the installation on the site of the buttons “Share» (share) of social networks

    [...] the links. More information about the strengths and weaknesses can be found here (in English): umairj.com/146/how-to-clear-facebook-shares-cache/ Three.Unfortunately, such a method, like Facebook, others sots.setey not. So for them to use [...]

  • Playgiirl <3

    I can’t englisch…, can you translate ‘& explain in german?? Please.. :)

  • Bruce

    Thanks, the cache issue was driving me nuts!  The debugger tool also identified some issues in OG metadata which was creating other problems.

  • http://www.facebook.com/deeptrouble Amandeep Jawa

    God – I *SO* appreciate this post! Thank you!

  • http://umairj.com/ Umair Jabbar

     Hallo, Sorry aber Ich kann kein Deutsch sehr schön

  • http://twitter.com/NanaStories Stories My NanaTells

    Thanks for this – I had used it before, but forgot the link,  I bought you a cup of coffee.  :-)

  • edgar

    thank you, it works

  • Jim

    Thank you for this post. I had a question for you, so if I don’t use the og:image tag it finds the images with in the article, but when I use the og:image tag it only uses that and won’t have the images from the story. How can I show both the og:image and the images from the article? Thank you in advance.

  • http://umairj.com/ Umair Jabbar

    Hi,

    I remember that you can add more than one og:image tags. That is the only way to show more than one images using the tags.

    I hope this helps you

  • Russ

    Very helpful, thanks.

  • Duncan

    Brilliant – really helpful

  • Michael

    Thanks so much. I’ve been waiting 24 hours to post a link to my blog on FB after publishing the wrong image thumbnail. I was about to pull my hair out. The “?v=1″ method worked great for me!

  • igor

    Thanks! And for Linkedin? i went clear cahce to, but i cant!

  • igor

    cache*

  • Stephane

    Thanks ;-)

  • Fay Kelley

    #3 … clearing FB cache worked a couple of weeks ago but will not work. Didn’t understand #1 and tried it…. didn’t work.

  • http://www.facebook.com/lisa.baranyay Lisa Lothridge Baranyay

    Thank you! Thank you! Thank you!

  • http://twitter.com/Wildsau Über-mensch

    What you’ve described here is exactly what I need to do. I update the same URL on my blog every week, and want to share that updated information on my FB timeline. However I can’t get any of these methods to work. I’ve tried all three. Any further thoughts or suggestions?

  • Ron

    You’re the best!!!

  • Phiquad

    Many, many thanks for this!

  • http://twitter.com/JMichaelRoach J. Michael Roach

    Extremely helpful post. Much appreciated!

  • OhWell

    Method 1 and 2 don’t work anymore, because facebook caches from the canonical url. As for method 3, I used the linter and it displays exactly what I need, however facebook uses the older different thumbnail to display on the timeline and the new one on my wall. So I see the updated thumb and everyone else sees the old one :( I guess I’ll have to reupload my video :(

  • http://www.facebook.com/darryl.kraemer Darryl Kraemer

    Thanks Umair. You just saved the day with the FB debugger!

  • Jin Ng

    Thanks for the info… Really useful

  • Barnes

    It might be old post, but it worked for me… awesome! thanks for your help… keep it up!

  • http://twitter.com/nornegru Norul Negru

    Thank you for this. It was killing me.

  • Anonymous

    Thanks! Just what I needed :)

  • http://twitter.com/MarkETennant Mark E Tennant

    Pow! You’re a genius Umair. Thanks much.

  • Denis

    thanks! спасибо огромное!

  • pgi

    dfdsd

  • ôppopp

    mgsegealert(‘hello’)

  • Ryan

    Thanks!

  • Роман

    Дякую!

  • Lee H

    I have no idea how to do any of this or where to even start. My wordpress blog posts to my facebook page and vice versa. They are pinging the same post back and forth. I have no clue how to find the URL or cache (method 1 and 2) or what to type in for Method 3. This is way over my pay grade.

  • Shayne

    Thanks man!

  • DJ WIZ

    Awesome!

  • Max

    Very helpful, thanks!

  • ItJustDoesNotWork

    Method 3 doesnt work…

  • ItJustDoesNotWork

    Oh sorry it does work only for link sharing, but does not work on fb-like-plugin like button share :)

  • Karen Gee

    Thank you so much – method 3 solved my problem

  • http://dangerismymiddlename.com Paul Danger Kile

    Thank you! That was my problem too.

  • עורך אתר התושבים

    Works for me:
    http://www.haipo.co.il
    Thanks !
    It was very painfull :-)

  • Stacie

    Method 1 FINALLY solved my problem! 4 Developers and almost 9 hours later… thank you very much! :)

  • mem

    Sorry. Didn’t understand method 3. What should I do?

  • Stiig Andreas Gade

    Method 3 was awesome! Exactly what I needed :)

  • GoggleOutlet

    METHOD 1- added tags to my description meta tag – AND YES!!!!!!!!!!!!!!! PROBLEM SOLVED. THANK YOU THANK YOU THANK YOU!!! I vary the V= each time I make an update; I just want my facebook ads to show up right, not worried about other’s getting wrong data, that’s not a problem for me. THIS IS AWESOME!!!

  • GoggleOutlet

    A GREAT variation on #1 … I took my index.html and copied it to index1.html – then put index1.html in my facebook link. It immediately picked up the new look, I also don’t have a funny looking link with ?v=X on it, the link is valid, and I can used index2.html if/when necessary. If anyone goes to my real index.html link it will display correctly as it is only these caching websites that have problems; it’s working great!! So my link is goggleoutlet.com/index1.html – thanks SO MUCH for your v= suggestion it put right on a good track.

  • GoggleOutlet

    Sorry for all the posts … another thing, facebook also adds a little icon to the graphic as I’m creating my post with the link; this icon lets me cycle through the JPGs on my site so I can pick the one I want; I created one that is 250×250 pixels which is perfect for facebook so I choose that one.

  • GoggleOutlet

    Why method #1 is INCREDIBLE – I have Amazon ads; Amazon is REALLY bad about updating description internally on items that have variants (different colors, sizes, etc.) so you can put a link on facebook to your amazon ad and very easily see old Amazon wording – it is a problem of both companies!! I put the ?v=X on my Amazon link on facebook and it solved my issues. AWESOME!!!

  • Johannes

    Thanks a lot! Method #3 rescues posts you need to reedit once you hit publish on a Facebook-connected WordPress site. Works like a charm!