Search code examples
javascriptfacebookshare

Facebook share does not preview (full) page


When I use the facebook share button on my website it does only show the website title but not the content of the page I share. Can't find a solution on the web.

I use the code from the facebook developers website

And I replaced the data-href for the button with my page URL: i.e. http://www.strongbase.nl/verslagdetail/2

But when I click the share button it only shows this (see screenshot below):

Is there a way to fix this?

http://puu.sh/dQDGZ/76817d30de.png

Thanks very much in advance!


Solution

  • You should implement some metatags.

    Look here: http://davidwalsh.name/facebook-meta-tags

    So for example, in head:

    <head>
        <meta property="og:title" content="Your pagetitle here"/>
        <meta property="og:url" content="http://urltoyourpage.com"/>
        <meta property="og:image" content="http://linktosome.com/image.png"/>
    </head>
    

    You can add more properties. Just google OpenGraph, or click on the provided link.