Home Home




To make Facebook fetch the correct article image in Publisher, you should add Meta tags to your theme and use a IF statement to make it invisible when on other modules. Add the following between your head tags in your theme:


<{if $xoops_dirname == "Publisher"}> 
        <
link rel="image_src" href="<{$item.image_path}>" /> 
        <
meta property="og:image" content="<{$item.image_path}>"/> 
        <
meta property="og:url" content="<{$item.itemurl}>"/> 
        <
meta itemprop="image" content="<{$item.image_path}>"/> 
        <
link rel="canonical" href="<{$item.itemurl}>"/>  
    <{/if}>


Facebook will use the tag and fetch the correct image. Without it, Facebook will grab any image off your site, and most times it is not relevant to the story.

|  Links 
Printer Friendly Page Send this Article to a Friend



 


 
Module Demos
Top Downloads




© 2009 - 2014 all right reserved | Danordesign - Free XOOPS Modules and PHP Scripts | Powered by XOOPS