Search code examples
htmlfacebook-opengraphdata-sharing

Sharing meta tag og:image for facebook is selecting other image then defined


The following code is not working correct anymore when I want to share this on Facebook, in my case I'm using AddThis.com.

<meta property='og:title' content='Zet je (fiets)licht aan! ' />
<meta property='og:image' content='https://www.veens-nieuws.nl/uploads/headlines/normal/anwb-licht.jpg' />
<meta property='fb:app_id' content='411722875953005' />
<meta property='fb:pages' content='126005518071034' />

For example you can see https://www.veens-nieuws.nl/lifestyle/zet-je--fiets-licht-aan- and share this item, you get not the correct image in the preview share box.

Is there something changed by Facebook, because it worked until a couple of weeks ago..


Solution

  • For Blog Post / Article

        <meta property="og:title" content="Title Goes Here">
        <meta property="og:type" content="article" />
        <meta property="og:url" content="http://www.example.com/link" />
        <meta property="og:image" content="" />
        <meta property="og:image:alt" content="Alt Text for Image">
        <meta property="og:site_name" content="YourSite" />
        <meta property="og:locale" content="en_US" />
        <meta property="og:contentnid" content="214" />
        <meta property="og:contenttype" content="article_listing" />
        <meta property="og:publishdt" content="Oct 5 , 2018" />
        <meta property="og:uploadedby" content="" />
        <meta property="fb:app_id" content="your app id" />
    

    For Simple Page :

    <meta property="og:title" content="Title" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="http://www.example.com/link" />
    <meta property="og:image" content="http://www.example.com/favicon.png" />
    <meta property="og:description" content="Description ..." /> 
    <meta property="og:site_name" content="SiteName" />
    <meta property="og:locale" content="en_US" />
    <meta property="fb:app_id" content="your app id" />