Clear facebook image cache for like and share button

Most of us want to include Facebook like button on websites.. When we like any page then Facebook like button receive page title, Page description and Image from the page automatically. But if you want that some special information should be shared then you have to write it specifically by writing special meta tags under head tag of you html page.

<meta property=”og:title” content=”Cutehits”/>
From the above tag you will tell facebook that this will be the tilte of this page for facebook like or share page

<meta property=”og:url” content=”http://www.cutehits.com/”/>
From the above tag you will tell facebook that this will be the url of this page for facebook like or share page

<meta property=”og:image” content=”Image path”/>
From the above tag you will tell facebook that this will be the Image of this page for facebook like or share page

<meta property=”og:site_name” content=”Cutehits”/>
From the above tag you will tell facebook that this will be the website name of this page for facebook like or share page

<meta property=”og:type” content=”blog”/>
This tag tells facebook that which category your site lies

<meta property=”og:description” Content =”Description.” />
From the above tag you will tell facebook that this will be the description of this page for facebook like or share page

facebook like

If you will mention these information under your page’s <head> and </head> section then facebook will cache these inromation at their end and when you will click on either like or share button then facebook will use these information at the time of sharing on facebook.

Facebook like button is always taking image or page tiltle or page description  from cache

If you are seeing that you have changed the website image from your code but still Facebook is receiving older image that you have used earlier then its common problem for many of Facebook developers. In this scenario you can use the Facebook Linter tool which can be found  <a href =’http://developers.facebook.com/tools/debug’>here</a>

Once you debug your site with the Facebook Linter tool then it will clear the cache on Facebook and then you will be able to show recent data on Facebook after Facebook like or Facebook share button.

Related posts:

The following two tabs change content below.

Chandra Shekhar

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)