Share on facebook - Picture

  • Hi all,

    When i share a thread on Facebook with share button, i get a text and a square without any picture.

    If there is no picture inside the thread, would it possible to manage a default picture for sharing on facebook ?



  • No, that is only for css changes and custom css.
    You can insert the meta tag if you edit the template headInclude

    i added the following code in headinclude of specific style :
    <meta property="og:image"content=""/>

    Like this :

    <base href="{$baseHref}" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="format-detection" content="telephone=no" />
    {if $allowSpidersToIndexThisPage|empty}<meta name="robots" content="noindex,nofollow" />{/if}
    {implode from=$__wcf->getMetaTagHandler() item=__metaTag glue="\n"}{@$__metaTag}{/implode}
    {event name='metaTags'}

    <!-- Stylesheets -->
    {event name='stylesheets'}

    {include file='headIncludeJavaScript'}

    <script data-relocate="true">
    {* dummy language item to preserve compatibility with WCF 2.0, move this to headIncludeJavaScript *}
    '': '{lang}{/lang}'

    {* DEPRECATED -- PLEASE USE javascriptLanguageImport@headIncludeJavaScript *}
    {event name='javascriptLanguageImport'}

    {* DEPRECATED -- PLEASE USE javascriptInclude@headIncludeJavaScript *}
    {event name='javascriptInclude'}

    <!-- Icons -->
    <link rel="icon" href="{@$__wcf->getFavicon()}" type="image/x-icon" />
    <link rel="apple-touch-icon" href="{@$__wcf->getPath()}images/apple-touch-icon.png" />

    <script data-relocate="true">
    $(function() {
    {* DEPRECATED -- PLEASE USE javascriptInit@headIncludeJavaScript *}
    {event name='javascriptInit'}
    <meta property="og:image"content=""/>

    But doesn't work :/ No picture on FB.

  • ok, it works, i forgot "www" :)

    But i removed meta tag because, for blog post, default picture will be use :/

    I would like default picture is use if there is no picture in thread or blog post; but maybe hard to manage this ?

  • The post may be old but the final question asked here is exactly my problem at the moment. I have added the meta tag:

    meta property="og:image"content=""/>

    just as suggested above, and I am now getting a site logo when I share to Facebook. But when I am sharing a post that has a photo included in it, I would prefer that the share contain the posts' photo, rather than the site logo. Is there a way to do this via plugin or otherwise?


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!